[Insight-users] Help: Image reverse in itk
Luis Ibanez
luis.ibanez at kitware.com
Sun Dec 19 18:35:43 EST 2004
Hi D.J.J,
VTK uses the Computer Graphics convention that the origin
is located on the upper left corner of the screen and the
+Y axis points down.
ITK uses the Math/Physics convention that the origin is
located on the lower left corner of the screen and the
+Y axis points up.
If you want to change the orientation of the image that
you are seeing, you have three independent options to
choose from:
1) Use the itkFlipImageFilter or the OrientImageFilter
before passing the ITK image to VTK.
http://www.itk.org/Insight/Doxygen/html/classitk_1_1FlipImageFilter.html
http://www.itk.org/Insight/Doxygen/html/classitk_1_1OrientImageFilter.html
OR
2) Use the vtkImageFlip filter in order to change the orientation
after you have passed your image to VTK
http://www.vtk.org/doc/nightly/html/classvtkImageFlip.html
OR
3) Manipulate the Camera in the vtkImageActor in order to
make sure that the orientation of the +Y axis is the one
that you want.
Note that if you display medical images, what really counts
is the orientation of the anatomy inside the image. You may
want to follow the conventions that Radiologists use for
looking at the images.
Please let us know if you have further questions.
Thanks
Luis
---------------
D.J.J wrote:
> hi,
> When i program with ITK and VTK, I meet this question as follow:
> 1) "reader" of vtk read the image file and visulize it
> 2) "reader' of itk read the image file, then build a "bridge" to vtk
> image, visulize it with vtk.
>
> from the two methods,I see one reverses the other up and down. I don't
> know which image is shown correctly and how to be unified.
>
> otherwise, I want to know the pixel index of the itk image how to match
> with point of cursor point. shortly, I want to know the index(0,0)
> come from the top left corner , bottom left corner or others.
>
> thanks very much
> D.j.j
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
More information about the Insight-users
mailing list