How to get mirrored view from vtkcamera

(Jayavardhan Ravi) #1

I used the VTK camera to change the position and focal length and was able to see the scene.
Now I was wondering how can I get the mirror image of the scene (Horizontal flip i.e. left becomes right & right becomes left)

I found that there is vtkImageFlip class applied on images.
https://vtk.org/doc/nightly/html/classvtkImageFlip.html#details
How can I achieve the same using the scene information from vtkCamera

Is there any function or ways to achieve this using vtk

Thanks for you time

Regards,
Jay

(Andras Lasso) #2

I’m not sure if you can apply flip by adjusting camera transforms (it could have side effects if you flip between left/right handed coordinate system).

One potential solution is to flip all your data sets (polydata, images, etc.) in the renderer. Since flipping turns surface inside out, you need to flip surface normals, too (using vtkPolyDataNormals or vtkReverseSense).