| 415 | |
| 416 | |
| 417 | ILboolean 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. |
| 440 | ILboolean iCheckDicom(DICOMHEAD *Header) |
no test coverage detected