[Insight-users] Possible bug reading DICOM MONOCHROME1 images with Pixel Padding Value != 2^bits stored-1
Mathieu Malaterre
mathieu.malaterre at gmail.com
Mon Feb 16 10:48:55 EST 2009
On Mon, Feb 16, 2009 at 1:03 PM, Iván Macía <imacia at vicomtech.org> wrote:
> Hi,
>
>
>
> I tried to load a DICOM MONOCHROME1 image (MG) and resulting output values
> are outside the range specified in the DICOM fields. The resulting image is
> shown in black with the W/L settings taken from DICOM.
>
>
>
> Debugging a bit and getting deep into ITK, it seems like the problem lies in
> the GDCM library in gdcm::PixelReadConvert::ConvertFixGreyLevels() and the
> interpretation of (0028,0120) Pixel Padding Value and (0028,0107) Largest
> Image Pixel Value. For this image, the Largest Image Pixel Value is 32767
> and the Pixel Padding Value 32767 (recommended to be 2^16-1 = 65535) but not
> mandatory.
>
>
>
> In gdcm::PixelReadConvert::ConvertFixGreyLevels() always pixels are
> converted in the form:
>
>
>
> value = 65535 - value
>
>
>
> which results in pixels above the 5571 - 32767 range for this image.
>
>
>
> In my opinion, in this case it should be
>
>
>
> value = 32767 - value
>
>
>
> which gives the correct values.
>
>
>
> I am not totally sure, but the image seems to be following the standard.
> Could please someone confirm this?
>
> We have several of these images and none is loading correctly
>
>
>
> I added a new bug entry in Mantis for this
>
> http://public.kitware.com/Bug/view.php?id=8538
Agreed with diagnosis. Thanks for bug report.
If you switch to gdcm 2.x (using ITK_USE_SYSTEM_GDCM) this bug will go away.
Thanks,
--
Mathieu
More information about the Insight-users
mailing list