Hi Taylor,

could you please elaborate on what kind of data objects you have in your scene? It sounds to us as if you are looking at your scene from the other side so that the image is in front of your camera-representation. Wouldn't it be sufficient to mirror the 2D image instead of rotating the viewport around the objects?
If we didn't understand your problem correctly, please let us know.

Regards
Christoph

On 05/07/2014 11:59 PM, Taylor Braun-Jones wrote:
Hello MITK users,

I have a custom mapper Image2DVtkMapper3D for rendering 2D image as a plane in a 3D scene with the vtkCamera placed precisely to mimic the real-life camera that actually took the shot. This is working well, but now I would like to take the viewport that I am rendering and mirror it horizontally. I was able to get this to work with:

vtkSmartPointer<vtkTransform> mirrorTransform = vtkSmartPointer<vtkTransform>::New();
mirrorTransform->RotateWXYZ(180, 0, 1, 0);
 camera->SetUserTransform(mirrorTransform);

But that breaks layering of objects in front of my 2D image plane object - they are now occluded by the 2D image plane. I was able work around this by disabling updates to the depth buffer in vtkOpenGLImageSliceMapper::Render with:

  glDisable(GL_DEPTH_TEST);

But I know this is not the proper solution. So my question is what is the proper MITK-ish solution here?

Thanks for any suggestions,
Taylor

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their 
applications. Written by three acclaimed leaders in the field, 
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to