Open GoogleCodeExporter opened 9 years ago
p.s. I get these errors with some of the CT's in the AAM Pinnacle series.
Original comment by roy.coding@gmail.com
on 2 Dec 2010 at 7:37
Just a note: The binary data can be read using the struct module.
If for example the LargestImagePixelValue = '\xb2\x0b', as with image 64 in the
AAM series, you can use:
img64 = dicom.read_file('ct.64.dcm')
struct.unpack('h', img64.LargestImagePixelValue)
That returns (2994,) where 'h' means short integer.
We may need some code to check the data type, since 'h' may only work here (I
haven't looked at DICOM docs or other image files yet).
Original comment by roy.coding@gmail.com
on 5 Dec 2010 at 8:18
This doesn't give an error anymore with the latest changeset: r599ab350df91.
However, as you stated, the value still needs to be decoded to a short or an
unsigned short.
I am curious if this should be determined by looking at some combination of
High Bit, Bits Allocated and Bits stored to see whether it should be a short or
unsigned short.
Some more investigation into the DICOM documentation would be required here.
Original comment by bastula
on 25 Jan 2012 at 3:00
Original issue reported on code.google.com by
roy.coding@gmail.com
on 2 Dec 2010 at 7:35