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

Mathieu Malaterre mathieu.malaterre at gmail.com
Mon Jun 2 08:28:42 EDT 2008


Hi Walter,

 You need to instantiate your image as type 'int'.

HTH
-Mathieu

On Wed, May 28, 2008 at 8:57 PM, Walter Blume <WBlume at stereotaxis.com> wrote:
> 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?
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>
>



-- 
Mathieu


More information about the Insight-users mailing list