[vtkusers] Flipping the image with vtkCamera::Yaw() makes image disappear

Jesús Spí­nola jspinola at gmail.com
Fri Mar 2 08:44:39 EST 2007


>
> are you sure you have to use yaw ? In an aircraft yaw means that if you
> fly from east to west after yaw(180) you fly from west to east. So in
> your case you can not see the image because it is behind your camera.


I see, Yaw is not the appropiate method because changes the focal point and
I want to change the position of the camera.

What about mirroring your camera-position on the other side of your
> image ? This would give you a change in left/right (if this is your
> intention).


Is just what I want, a mirror effect

When you roll(180) then you got a left/right AND upside/down flip.


You're wrong, with Roll, you rotate the image by the Z axis. With this you
get left/right and upside/down flipped too , I only want to flip
horizontally (left becomes right and viceversa) but up and down remains the
same.


I tried with Azimuth that does something similar to Yaw but about the
position of the camera, not the focal point, the problem is if I move the
image actor this movement is also mirrored, so I need to take into account
another parameters ( position, focal point, translation... )

I want the same effect as if I rotate the image actor with this sample code

imageActor->SetOrigin( imageActor->GetCenter() );
imageActor->RotateY( 180 ) ;

(assuming we are on axial view)

but I want to do the same effect with the camera.

Hth,
> Tom
>
> Jesús Spí­nola wrote:
> > Hello,
> >
> > I'm manipulating the camera of vtkImageViewer2 to flip my image. One
> > of the things I want to do is rotate the camera to see the image
> > flipped. For this I used the method Yaw(180).
> > After applying the Yaw(180) the image disappears. If I apply Yaw(180)
> > again, the image appears again in the original orientation.
> >
> > If after Yaw(180) I reset the camera with vtkRenderer::ResetCamera()
> > the image gets flipped as I want, but I get other unpleasant effects,
> > because of the reset, because the camera is positioned on the center,
> > and I want to keep other transformations that I did before the flip,
> > like rotations, pan, etc
> >
> > Could someone tell me which things of the camera I need to update to
> > see the image flipped after the Yaw?
> >
> > Thanks!
>
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070302/a9149c0a/attachment.htm>


More information about the vtkusers mailing list