I have an MR image with the following tags:
Code: Select all
...
(0028,0100) BitsAllocated: 16
(0028,0101) BitsStored: 16
(0028,0102) HighBit: 15
(0028,0103) PixelRepresentation: 0
(0028,0106) SmallestImagePixelValue: 40
(0028,0107) LargestImagePixelValue: 4079
...
(0040,9211) RealWorldValueLastValueMapped: 4095
(0040,9216) RealWorldValueFirstValueMapped: 0
...
Even if I force conversion to (EPR_Uint16*)DiMonoPixelTemplate::getData(), it seems DiMonoPixelTemplate::getData() does not read the proper amount of bits.
Considering (0028, 0107) LargestImagePixelValue, I was assuming original data would have 12 unsigned bits stored and 4 bits padded to 0. But getData() returns minimum value of 0 and maximum value of 65535. (Second problem)
If I read using getOutputData(), everything works fine. But I have to use getInterData() to avoid rendering, since I use it for calculating SI.
Not sure if it is related, but the following values were set under DiMonoPixel::Modality at the time of access.
Code: Select all
...
Representation: EPR_Sint16 (3)
MinValue: -3080.6178...
MaxValue: 3117.4457...
Bits: 13
UsedBits: 13
...
https://drive.google.com/file/d/1cSMHk_ ... sp=sharing
Would this be a problem with the file itself or getInterData()? Any input would be very helpful.
Thanks for your time!!