When reading a Dicom File and enumrating the IDicomElements I noticed the following in the output
(0002,0012) ImplementationClassUID ,Type: UniqueIdentifier/System.String value 1.2.40.0.13.1.1
(0002,0013) ImplementationVersionName,Type: ShortString/System.String value dcm4che-1.4.29
(0008,9205) PixelPresentation ,Type: CodeString/System.String value MONOCHROME
(0008,9206) VolumetricProperties ,Type: CodeString/System.String value SAMPLED
(0008,9207) VolumeBasedCalculationTechnique,Type: CodeString/System.String value MAX_IP
(0008,0005) SpecificCharacterSet ,Type: CodeString/System.String value ISO_IR 100
(0008,0008) ImageType ,Type: CodeString/System.String value DERIVED\PRIMARY\TOMOSYNTHESIS\MAXIMUM
I quickly found the bug to be located in the TagSorter;
The code uses BitConverter.ToInt16(tagBytes_#,0)
for 9205 that results in a negative value (-28155)
So the solution is to use BitConverter.ToUInt16(tagBytes_#,0) instead
Rex,
When reading a Dicom File and enumrating the IDicomElements I noticed the following in the output
(0002,0012) ImplementationClassUID ,Type: UniqueIdentifier/System.String value 1.2.40.0.13.1.1 (0002,0013) ImplementationVersionName,Type: ShortString/System.String value dcm4che-1.4.29 (0008,9205) PixelPresentation ,Type: CodeString/System.String value MONOCHROME (0008,9206) VolumetricProperties ,Type: CodeString/System.String value SAMPLED (0008,9207) VolumeBasedCalculationTechnique,Type: CodeString/System.String value MAX_IP (0008,0005) SpecificCharacterSet ,Type: CodeString/System.String value ISO_IR 100 (0008,0008) ImageType ,Type: CodeString/System.String value DERIVED\PRIMARY\TOMOSYNTHESIS\MAXIMUM
I quickly found the bug to be located in the TagSorter; The code uses
BitConverter.ToInt16(tagBytes_#,0)
for 9205 that results in a negative value (-28155) So the solution is to useBitConverter.ToUInt16(tagBytes_#,0)
insteadAndre Sikma