[vtkusers] DICOM confusion (GDCM? ITK?)

Mathieu Malaterre mathieu.malaterre at gmail.com
Mon Nov 16 03:05:14 EST 2009


On Sun, Nov 15, 2009 at 9:19 PM, Christopher Denter
<dennda at the-space-station.com> wrote:
> Hello,
>
> I'm new to VTK and DICOM.
>
> I have a series of DICOM files that I want to render with VTK. I can load those files in OsiriX and perform the usual volume rendering on them without problems.
> Now I also want to use that dataset in my own application. Using vtkDICOMImageReader I get this error message:
>        """vtkVolumeRayCastMapper (0x13581920): Cannot volume render data of type short, only unsigned char or unsigned short."""
>
> If I understand correctly, VTK's DICOM-reading capabilities are somewhat limited, so I have to use GDCM (or ITK?). Is that correct?
> I then tried to compile GDCM 2.0.13 with CMake 2.8.0 on OSX 10.6.2, but the configure process fails with this error: http://paste.pocoo.org/show/150837/
> Since I suspect this is a CMake error, I already created a bug report for this: http://www.cmake.org/Bug/view.php?id=9898
> On Ubuntu 9.10 I installed python-vtkgdcm. I can then 'import vtkgdcm', but the GDCM test Utilities/VTK/Testing/Python/TestvtkGDCMImageReader.py just segfaults.
>
> Now I just want to make sure that my initial assumptions (i.e., that I have to use GDCM for this) are correct before I wait a long time for a fix that doesn't actually help me.
> My dataset is just a folder with many *.dcm files in it, and a DICOMDIR file.
>
> So: Do I need GDCM in addition to VTK for this?

There is no-real point in using GDCM in this case. Your issue here is
simply to cast your image to unsigned short. See vtkImageCast or
vtkImageShiftScale.

HTH
-- 
Mathieu



More information about the vtkusers mailing list