[Insight-users] vtk vs mhd images

David Pastor david.pastor at die.upm.es
Fri Mar 13 07:56:01 EDT 2009


Hi everyone!

sorry for dumping emails in the list lately, but I'm encountering unexpected problems...

I'm using SubtractImageFilter to get the an output image. In order to preserve the intensity profile I'm using a signed short image for 2 unsigned char input images.

As I don't want negative values, I get the minimum of the image (a negative value) and create and offset image so adding it to the output of SubtractImageFilter will return an image with positive values that i template as unsigned short to avoid problems.

Well, so far so good I think. Then, i write the final image to a .mhd type image and the result looks as I wanted. But if I asked it to write a vtk image, the resulting image is far from what I expected. Instead, my image is satured on the high levels and is generally brighter. 

The histogram shows that the values have an addition offset so the values closer to the maximum are satured. The mhd image has a max value of 456 (which is consistent with something that come from unsigned char images), but the vtk image is beyong 60000.

Any idea about this?? Please note, that the only difference is the format of the output image passed in the command line. Input and code are exactly the same.

Thanks
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090313/9c319729/attachment.htm>


More information about the Insight-users mailing list