[Insight-users] possible underflow/overflow bug with itkGDCMImageIO

Walter Blume WBlume at stereotaxis.com
Wed May 28 14:57:46 EDT 2008


I am writing some code to compute DRRs, starting with the ITK example code in DigitallyReconstructedRadiograph1.cxx and DicomSeriesReadImageWrite2.cxx as examples.

I have some DICOM images that are of type signed short.  They contain the value -32768 for some of the pixel values.   The rescale slope and intercept values in the dicom are 1 and -1024.   When I read these DICOM images the pixel values get scaled and transformed by the equation   buffer = pixel*slope + intercept.  This causes the buffer values to be represented as the positive number 31744 rather than being clipped to -32768, which then causes problems when computing the DRR, since I can't filter out the huge positive values.

Is there a simple way to avoid this problem?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20080528/71147442/attachment.htm>


More information about the Insight-users mailing list