+ // check Pixel Representation (default it as 0 -unsigned-)
+
+ DataEntry *e_0028_0103 = FileInternal->GetDataEntry(0x0028, 0x0103);
+ if ( !e_0028_0103 )
+ {
+ gdcmWarningMacro("PixelRepresentation (0028,0103) is supposed to be mandatory");
+ CopyMandatoryEntry(0x0028, 0x0103,"0","US");
+ }
+ else
+ {
+ int sign = (int)e_0028_0103->GetValue(0);
+ if (sign !=1 && sign !=0)
+ {
+ gdcmWarningMacro("PixelRepresentation (0028,0103) is supposed to be =1 or =0");
+ CopyMandatoryEntry(0x0028, 0x0103,"0","US");
+ }
+ }
+