Any help is appreciated
I whant to extract the CT pixeldata for computation.
Code: Select all
> convert -compress none CT.dcm CT.pgm
I get 15568(3CD0 Hex) instead of 973(03CD Hex). The Pixel value is not what I expected!
Code: Select all
"P2
512 512
65535
15568 15568 15568 15568 ..."
The DICOM file pixels looks like this in a HEX editor.
Code: Select all
cd 03 cd 03 cd 03
Part of the DICOM dump:
Code: Select all
...
| (0002,0010) : UI Len: 20 HeaderTransferSyntaxUID Value: [1.2.840.10008.1.2.1]
...
| (0028,0002) : US Len: 2 SamplesperPixel Value: [1]
| (0028,0004) : CS Len: 12 PhotometricInterpretation Value: [MONOCHROME2 ]
| (0028,0010) : US Len: 2 Rows0028 Value: [512]
| (0028,0011) : US Len: 2 Columns0028 Value: [512]
| (0028,0030) : DS Len: 4 PixelSpacing Value: [1\1 ]
| (0028,0100) : US Len: 2 BitsAllocated0028 Value: [16]
| (0028,0101) : US Len: 2 BitsStored Value: [12]
| (0028,0102) : US Len: 2 HighBit Value: [11]
| (0028,0103) : US Len: 2 PixelRepresentation Value: [0]
| (0028,1050) : DS Len: 6 WindowCenter Value: [50\300]
| (0028,1051) : DS Len: 8 WindowWidth Value: [350\2000]
| (0028,1052) : DS Len: 6 RescaleIntercept Value: [-1024 ]
| (0028,1053) : DS Len: 2 RescaleSlope Value: [1 ]
| (0028,1054) : LO Len: 2 Rescaletype Value: [HU]
...