[Insight-users] Possible bug reading DICOM MONOCHROME1 images with Pixel Padding Value != 2^bits stored-1

Mathieu Malaterre mathieu.malaterre at gmail.com
Sun Feb 22 08:21:04 EST 2009


'lo

On Thu, Feb 19, 2009 at 3:36 PM, Iván Macía <imacia at vicomtech.org> wrote:
> Hi again,
>
> I come back with the technical details. My diagnosis of the problem does not
> seem totally correct and does not seem so simple. In many of the MG images
> we have with Photometric Interpretation MONOCHROME1, simply inverting the
> stored pixel values for presentation works (this is the current
> implementation in GDCM 1.x in ITK). Rescale Slope/Intercept are 1 and 0 so
> these are not the problem right now.

ok good.

> Now we have this other MG image which is also MONOCHROME1 but that appears
> all black with the WL/WW values taken from DICOM. A careful look at the
> pixel values obtained for the ITK image shows that:

That's what I have been trying to tell you: some attributes from the
initial input DICOM cannot be reused ! WL/WW are amoung them.

> - The padded pixel values, that occupy most of the area of the image but the
> right side, take a value of 32768 which results from the inversion of
>  ( 65535 - 32767 ) in gdcm::PixelReadConvert::ConvertFixGreyLevels() which
> on the other hand would be incorrect. This is because Pixel Padding Value
> (0028,0120) is 32767 where the software expects 65535 for 16 bits stored.
> - The right area of the screen, which is occupied by the breast itself holds
> stored values around 9000 which are converted to 65535 - 9000 = 56535. This
> is the final value stored in the ITK image without any WW/WL applied which
> is incorrect.
>
> However if instead of inverting using x = 65535 - x, I use x = 32767 - x,
> the padded pixel values get 0 intensity and are displayed in black, but the
> breast itself appears all white after applying WL/WW. A careful look at
> these values shows that they are about 20000, which for a WL/WW value of
> 7800/3600 of course appear in white. It seems like the values of the breast
> should remain untouched.
>
> The image seems to be correct since there are some softwares able to
> interpret it as I would expect.
>
> Now looking more carefully at the DICOM metadata I found these tags which
> may be involved in the problem:
> (2050,0020) Presentation LUT Shape : INVERSE
> And also
> (0008,0068) Presentation Intent Type : FOR PRESENTATION

No those attribute can be safely discarded AFAIK.

When the user explicitly pass the input data dict from the input
reader to the output reader ITK internal assume he/she understand what
he is doing. You should not do that in the general case.
Simply disconnect that, and you should get a valid DICOM image with no
WL/WW (expressed in MONOCHROME2 color space).

2cts
-- 
Mathieu


More information about the Insight-users mailing list