[Insight-users] ITK4 ImageToVTKImageFilter improvements?

Bill Lorensen bill.lorensen at gmail.com
Tue Apr 12 11:49:31 EDT 2011


Dženan,

vtk and itk have different coordinate systems. itk treats images such that
the first row of pixels on disk is the first row of pixels in memory. This
is the normal imaging convention. vtk places the last row of pixels on disk
as the first row of pixels in memory. This is normal graphics convention.

To get the two coordinate systems to agree, use either itkFlipImageFilter or
vtkImageFlip to flip the y-axis.

vtk does not store the orientation of an image. itk does. If your images
have a non-identity orientation (direction), then you should resample the
image before passing it to vtk.

Bill

2011/4/12 Dženan Zukić <dzenanz at gmail.com>

> Hi ITK programmers!
>
> ITK wiki <http://www.itk.org/Wiki/ITK> states "a beta of ITK4 will be
> available by the end of March 2011". Could you please update that info
> (since it is no longer true).
>
> And a question: do you plan to fix itk::ImageToVTKImageFilter so it works
> properly, i.e. physical coordinates in ITK and world coordinates in VTK are
> equal, if you haven't done so already?
>
> Problem example: I load a dataset using ITK readers, apply some filters to
> it (denoising, rescaling), pass it through ImageToVTKImageFilter and add it
> into the scene using vtkGPUVolumeRayCastMapper. I also do segmentation using
> ITK's physical coordinates, create polygonal meshes of segmented objects,
> also add them to the scene and behold: they are in completely different
> places (if ITK_IMAGE_BEHAVES_AS_ORIENTED_IMAGE is set to TRUE)!
>
> The workaround is to set ITK_IMAGE_BEHAVES_AS_ORIENTED_IMAGE to FALSE, but
> then real image orientation is lost (I don't need it yet but I plan to use
> it).
>
> This problem would be understandable if ITK and VTK were made by 2
> different companies (but it is not the case).
>
> Regards,
> Dženan
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110412/f4096057/attachment.htm>


More information about the Insight-users mailing list