[Insight-users] Bad pixel range for some images opened with gdcm
Mathieu Malaterre
mathieu.malaterre at gmail.com
Thu Dec 11 09:47:44 EST 2008
Hi Jesus,
On Thu, Dec 11, 2008 at 3:31 PM, Jesús Spínola <jspinola at gmail.com> wrote:
> Hello,
>
> I'm using itk 2.8.1 and I have a problem reading some DICOM images with
> itkGDCMImageIO regarding the pixel range.
>
> The problem is it seems gdcm is giving a bad pixel range ( smallest and
> largest value ) reading some images for some reason I don't know.
>
> For example, I have images with a range 0-333 (extracted from the
> corresponding dicom file tags ) and the output range gdcm is giving me, and
> therefore itk image and vtk image too, is 0-20 which is completely wrong,
> so when I'm applying the default window level (426,191), the image is
> appering me nearly black because the window level settings is for the range
> 0-333 not 0-20.
>
> The only output itkGDCMImageIO is giving me about this problem is this
> message
>
> Must downscale data from 16 bits to 12
>
> I tried to open the same images with commercial applications and other
> toolkits (eFilm and dcmtk), and they open the images and apply the window
> level correctly.
>
> I attach you one dicom file that gdcm has problems with. I also attach 3
> images depicting the results opening the image with gdcm ( rendering it with
> vtk ), eFilm and dcmtk. As I said before, efilm and dcmtk are dealing ok
> with the file, as you can see.
>
You have clearly identify the issue. This bug has been in gdcm 1.2.x
branch for a while and was only recently fixed (ITK CVS).
Unfortunately it did not make it into neither ITK 3.10 nor ITK 3.10
patch 1.
You can retrieve the diff here:
http://public.kitware.com/cgi-bin/viewcvs.cgi/Utilities/gdcm/src/?root=Insight&sortby=date#dirlist
So your solution are:
- Switch to ITK CVS
- Use a system gdcm 2.x :
http://apps.sourceforge.net/mediawiki/gdcm/index.php?title=GDCM_Release_2.0
and relink ITK 2.8 to this one instead.
- Use a system gdcm 1.2.5, and relink ITK 2.8 to use this one instead.
You could also replace the gdcm subdir from ITK 2.8 with the one from
ITK CVS, and rebuild it should work (not tested).
HTH
--
Mathieu
More information about the Insight-users
mailing list