[Insight-users] Modality LUT transform with gdcmIO

Jesús Spí­nola jspinola at gmail.com
Wed Feb 21 07:38:37 EST 2007


>
>
>         No ITK will always apply the modality LUT for grayscale image. You
> cannot control this option. There is IMHO no reason to disable this
> behavior. Please describe why you are looking for something like this
> This is potentially dangerous, since it will affect professional
> interpretation of the image.


I'm using itk 2.8.1 with the version of gdcm that ships with it ( i don't
use an external build of gdcm lib ). I'm doing testing with several test
images for grayscale display consistency and I found some problems about
modality lut which I don't know if they're bugs of gdcm or not.

As you said, gdcm always applies modality lut transforms, but in my case
this is not true. When there are the rescale slope/intercept values they're
applied but there's no modality lut transform when there are modality lookup
tables .

For example, with test image
http://www.creatis.insa-lyon.fr/~jpr/PUBLIC/gdcm/gdcmSampleData/imgdisplay_testcases/mlut_18.dcm
it has a pixel range of -2048-2047 and a modality lut with lut descriptor (
4096\63488\16, that is, the lut has 4096 entries, and the first value mapped
is -2048 and each value in the lut is 16-bit ). The values in the lut range
from 0 to 65535 with increment +16, so the lookup table looks like
0,16,32,48,....65535, so value 0 in original image corresponds to 0, value 1
with 16, value 2 with 32, ... value 4095 with 65535.
But when I read this image it still has the range -2048..2047, so it seems
the modality lut is not applied, and that's why I'm asking if there's some
method to disable/enable the modality lut's.because I though maybe the
modality lut application was not enabled. Is this just a bug or this kind of
luts are not implemented in the version of gdcm that comes with itk 2.8.1??
I have the same problem with
http://www.creatis.insa-lyon.fr/~jpr/PUBLIC/gdcm/gdcmSampleData/imgdisplay_testcases/mlut_19.dcm

Then, I also have a case where the rescale slope/intercept is not applied
correctly
http://www.creatis.insa-lyon.fr/~jpr/PUBLIC/gdcm/gdcmSampleData/imgdisplay_testcases/xlut_01.dcm
The original range is 128..255. The rescale slope is = 2 and the rescale
intercept is = -128.
The expected range after apply the rescale should be 128*2-128..255*2-128 ==
128..382 but surprisingly I get a range of -128..126 which is obviously
wrong.

I would like you to check this and find the possible bugs and solutions to
it. Thanks!

-Mathieu
>
> Jesús Spí­nola wrote:
> > Is this behaviour modificable? I mean, is there a method in the proper
> > gdcm class to turn on/off  the modality lut transforms?
> >
> > 2007/2/8, Mathieu Malaterre < mathieu.malaterre at kitware.com
> > <mailto:mathieu.malaterre at kitware.com>>:
> >
> >     Jesús Spí­nola wrote:
> >      > Hello,
> >      >
> >      > I'm reading a series of DICOM images with the
> itk::ImageSeriesReader
> >      > class attaching the itk::GDCMImageIO as the ImageIO for the
> >     series reader.
> >      > When the rescale intercept and rescale slope values are present
> >     in the
> >      > dicom series, this parameters are applied to the resulting
> >     itk::Image.
> >      > Another way of define a rescale of the values of the raw pixels
> >     of the
> >      > dicom images is the modality lut. If present, does gdcm apply
> this
> >      > modality lut to the resulting image? If it does not, there's any
> >     method
> >      > to make gdcm apply this lut?
> >
> >
> >     Hi Jesús,
> >
> >        Yes GDCM will apply any modality lut directly for you. In case of
> an
> >     RGB image be sure to construct a RGB pixeltype for reading your
> image.
> >
> >     HTH
> >     Mathieu
> >
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20070221/3abe1e6e/attachment.html


More information about the Insight-users mailing list