This thread is quite old, but I thought I'd close the loop since I've
solved the problem.

Mirroring the 2D image does not work because it affects the relative
position of objects projected onto the image from the perspective of the
camera. The camera is positioned programmatically simulate the actual
position of the real-life X-ray tube relative to the X-ray detector (i.e.
the 2D image plane).

But I was able to solve the problem of objects "behind" the 2D image plane
not showing up by giving their node a higher "layer" property (I thought I
had tried this before, but I had a bug in that code and was not setting the
"layer" property appropriately.

Best,
Taylor

On Wed, Jun 4, 2014 at 8:06 AM, Christoph Kolb <[email protected]>
wrote:

>  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
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mitk-users
>
>
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to