[vtkusers] ITK image to VTK: wrong display

Marcos fotosentido at gmail.com
Sun Sep 13 18:01:02 EDT 2015


Hi,
I'm using ITK to read dicom files, and connecting them to VTK.

I'm using the examples of gdcmdata (
http://sourceforge.net/projects/gdcm/files/gdcmData/)

But still... I'm beginning to surrender, because I can't get right the
first image (3E768EB7.dcm).

I'm posting my problem in VTK because I saved my image from ITK (changing
personal metadata) and opened with the Philips DICOM Viewer, and I see it
right too. So it has to be my VTK setup.

The thing is I don't apply any filter in VTK. I was applying one on ITK
(RescaleIntensityFilter, setting minimum 0 and maximum output 255.) but
without effect.


Philips DICOM Viewer, here the image:

http://s8.postimg.org/d6oey6esl/correctimage.png

In my application, using unsigned short from ITK:

http://s22.postimg.org/5hjhjwlsh/unsignedshort.png

In my application, using unsigned int from ITK:

http://s13.postimg.org/xaoknjjzr/unsignedchar.png

I tried this in VTK:

double* range = imageViewer->GetInput()->GetScalarRange();

imageViewer->SetColorWindow(range[1] - range[0]);

imageViewer->SetColorLevel(0.5 * (range[1] + range[0]));


But nothing. I just don't know what to do.
Also I can't see color images.
I'd aprecciate any kind of guidance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150914/58dd5aeb/attachment.html>


More information about the vtkusers mailing list