+ // Let's check 'No Preamble Dicom File' :
+ // Should start with group 0x0002
+ // and be Explicit Value Representation
+
+ s16 = *((uint16_t *)(deb));
+ SwapCode = 0;
+ switch ( s16 )
+ {
+ case 0x0002 :
+ SwapCode = 1234;
+ entCur = deb + 4;
+ break;
+ case 0x0200 :
+ SwapCode = 4321;
+ entCur = deb + 6;
+ }
+
+ if ( SwapCode != 0 )
+ {
+ if ( memcmp(entCur, "UL", (size_t)2) == 0 ||
+ memcmp(entCur, "OB", (size_t)2) == 0 ||
+ memcmp(entCur, "UI", (size_t)2) == 0 ||
+ memcmp(entCur, "SH", (size_t)2) == 0 ||
+ memcmp(entCur, "AE", (size_t)2) == 0 ||
+ memcmp(entCur, "OB", (size_t)2) == 0 )
+ {
+ Filetype = ExplicitVR;
+ gdcmWarningMacro( "Group 0002 : Explicit Value Representation");
+ return true;
+ }
+ }
+// ------------------------------- End of 'No Preamble' DicomV3 -------------
+