MCPcopy Create free account
hub / github.com/DentonW/DevIL / GetUID

Function GetUID

DevIL/src-IL/src/il_dicom.cpp:417–437  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

415
416
417ILboolean GetUID(ILubyte *UID)
418{
419 ILubyte VR1, VR2;
420 ILushort ValLen;
421
422 // 2 byte character string telling what type this element is ('OB', 'UI', etc.)
423 VR1 = igetc();
424 VR2 = igetc();
425
426 if (VR1 != 'U' || VR2 != 'I') // 'UI' == UID
427 return IL_FALSE;
428
429 ValLen = GetLittleUShort();
430 if (ValLen > 64)
431 return IL_FALSE;
432 if (iread(UID, ValLen, 1) != 1)
433 return IL_FALSE;
434 UID[ValLen] = 0; // Just to make sure that our string is terminated.
435
436 return IL_TRUE;
437}
438
439// Internal function used to check if the HEADER is a valid DICOM header.
440ILboolean iCheckDicom(DICOMHEAD *Header)

Callers 1

iGetDicomHeadFunction · 0.85

Calls 1

GetLittleUShortFunction · 0.85

Tested by

no test coverage detected