<div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br> No ITK will always apply the modality LUT for grayscale image. You<br>cannot control this option. There is IMHO no reason to disable this
<br>behavior. Please describe why you are looking for something like this<br>This is potentially dangerous, since it will affect professional<br>interpretation of the image.</blockquote><div><br>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.
<br><br>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 .
<br><br>For example, with test image <a href="http://www.creatis.insa-lyon.fr/~jpr/PUBLIC/gdcm/gdcmSampleData/imgdisplay_testcases/mlut_18.dcm">http://www.creatis.insa-lyon.fr/~jpr/PUBLIC/gdcm/gdcmSampleData/imgdisplay_testcases/mlut_18.dcm
</a><br>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.
<br>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??<br>I have the same problem with <a href="http://www.creatis.insa-lyon.fr/~jpr/PUBLIC/gdcm/gdcmSampleData/imgdisplay_testcases/mlut_19.dcm">
http://www.creatis.insa-lyon.fr/~jpr/PUBLIC/gdcm/gdcmSampleData/imgdisplay_testcases/mlut_19.dcm</a><br><br>Then, I also have a case where the rescale slope/intercept is not applied correctly<br><a href="http://www.creatis.insa-lyon.fr/~jpr/PUBLIC/gdcm/gdcmSampleData/imgdisplay_testcases/xlut_01.dcm">
http://www.creatis.insa-lyon.fr/~jpr/PUBLIC/gdcm/gdcmSampleData/imgdisplay_testcases/xlut_01.dcm</a><br>The original range is 128..255. The rescale slope is = 2 and the rescale intercept is = -128. <br>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.
<br><br>I would like you to check this and find the possible bugs and solutions to it. Thanks!<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
-Mathieu<br><br>Jesús Spínola wrote:<br>> Is this behaviour modificable? I mean, is there a method in the proper<br>> gdcm class to turn on/off the modality lut transforms?<br>><br>> 2007/2/8, Mathieu Malaterre <
<a href="mailto:mathieu.malaterre@kitware.com">mathieu.malaterre@kitware.com</a><br>> <mailto:<a href="mailto:mathieu.malaterre@kitware.com">mathieu.malaterre@kitware.com</a>>>:<br>><br>> Jesús Spínola wrote:
<br>> > Hello,<br>> ><br>> > I'm reading a series of DICOM images with the itk::ImageSeriesReader<br>> > class attaching the itk::GDCMImageIO as the ImageIO for the<br>> series reader.
<br>> > When the rescale intercept and rescale slope values are present<br>> in the<br>> > dicom series, this parameters are applied to the resulting<br>> itk::Image.<br>> > Another way of define a rescale of the values of the raw pixels
<br>> of the<br>> > dicom images is the modality lut. If present, does gdcm apply this<br>> > modality lut to the resulting image? If it does not, there's any<br>> method<br>> > to make gdcm apply this lut?
<br>><br>><br>> Hi Jesús,<br>><br>> Yes GDCM will apply any modality lut directly for you. In case of an<br>> RGB image be sure to construct a RGB pixeltype for reading your image.<br>>
<br>> HTH<br>> Mathieu<br>><br>><br><br></blockquote></div><br>