[vtkusers] ITK image to VTK: wrong display

Marcos fotosentido at gmail.com
Sun Sep 13 18:35:57 EDT 2015


I don't know why (if somebody can explain...), changing pixel type from
unsigned short to float makes a difference:


Not enough, but I have two user controls to change window/level, and
incrementing window value and decrementing level value I get the same image
that Philips Viewer shows (about 350 window and 30 level):


PD: I found out in the Philips viewer some window/level presets... and the
one it's using has window: 360 and level: 60 (you can choose another
I was opening another files, and there's always those presets.

Does that mean that is correct that I always set those presets when loading
my files?

That doesn't resolve why I can't load color on my images :(
But the color Dicom file I'm trying... Philips can't even load it, it says
it has invalid data. I can view it at least.

But if I set it to 360 and 60 I see it too bright so... I return to my
question: how to know what preset is fine for each file?


2015-09-14 0:01 GMT+02:00 Marcos <fotosentido at gmail.com>:

> 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/03af07fb/attachment.html>

More information about the vtkusers mailing list