[vtkusers] vtkImageFlip ?

tom fogal tfogal at apollo.sr.unh.edu
Mon Sep 27 17:44:10 EDT 2004


forgot to CC the list... =(

------- Forwarded Message

From: tom fogal <tfogal at apollo.sr.unh.edu>
To: "Pallavi Joshi" <pallavi.joshi at vanderbilt.edu>
Subject: Re: [vtkusers] vtkImageFlip ? 
In-Reply-To: Your message of "Mon, 27 Sep 2004 15:49:55 CDT."
             <000a01c4a4d3$8b76cd10$da593b81 at Pallavi> 
References: <000a01c4a4d3$8b76cd10$da593b81 at Pallavi> 
Date: Mon, 27 Sep 2004 17:43:30 -0400
Sender: tfogal at apollo

 <000a01c4a4d3$8b76cd10$da593b81 at Pallavi>"Pallavi Joshi" writes:
>Hi,
>My 3D image volume has its Z slice numbers increasing in one direction =
>while VTK has it in the other direction. i.e. the slice number in my =
>viewer =3D 255-slice no. in VTK. I wish to flip this image. How can I do =
>that so that the image is displayed exactly the same way in the window =
>but just the Z slice numbers are flipped ? Is vtkImageFlip the right =
>function for it ?

If I understand your question correctly, you could grab the active
camera and rotate it 180 degrees.

vtkRenderer *ren;
... /* stuff... */
vtkCamera *cam;
cam = ren->GetActiveCamera();
cam->Roll(180);

'Roll' might not be the correct parameter, and the angle given might be
in radians (not degrees), but you get the idea...

- -tom

------- End of Forwarded Message




More information about the vtkusers mailing list