[Insight-users] Re: ITK+VTK image upside down

Luis Ibanez luis.ibanez at kitware.com
Wed Jul 11 13:00:41 EDT 2007


Hi Andrew


VTK uses the computer graphics standard of having the origin
     at the upper left of a screen

ITK uses the mathematical standard of having the origin on
     the lower left.

Note however that all this is irrelevant since ITK does
provide any visualization functionalities. At the end
what matters is how all the elements map to physical space.


If you are combining ITK and VTK in a single application,
you should compose the scene by associating the position
of the vtkCamera to the location where the physician is
with respect to the patient.


See for example:
http://public.kitware.com/pipermail/insight-users/2007-July/022894.html



*DO NOT* flip the pixel data in the image.
          That will reverse left-right on the patient !!
          (e.g. do not use the FlipImageFilter).


The correct way of dealing with the orientation issues is
to use a coordinate system based on the DICOM default,
and to place and orient the vtkCamera in that context.



Regards,


    Luis



=================
Andrew Li wrote:
> Hi, Luis:
> 
> How are you?
> Our image processing package based on ITK has been running very well.
> Now we are looking a way to use VTK for image display.
> 
> I have just built a test program by following your document: "Getting
> Stared with ITK + VTK" without much of troubles.
> 
> When I run it, I noticed all images were upside-down.
> Other kind of datasets might have the same issue.
> 
> Is there a better way to deal with it in addition to flip images and
> datasets, say, a compiler switch to force VTK to use ITK conventions?
> 
> Please let me know.
> Thanks.
> 
> -Andrew
>  
> --------------------------------------------------------
> 
> This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information.Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. If you are the intended recipient, please be advised that the content of this message is subject to access, review and disclosure by the sender's Email System Administrator.
> --------------------------------------------------------
> 


More information about the Insight-users mailing list