Hi Christoph, I just need to have a foreground renderer to add some actors, but I cannot apply the fix you mentioned in your previous answer (I just can use the 2014.03 version with no mods), so I was wondering where could I add the foreground renderer inside the mapper.
Right now Im adding a foreground render in a view and then getting the highest layer renderer in the mapper...but if I leave it like that it is a recipe for future disaster. I would really appreciate if you could give me a hint. Thanks, Fede El sep 7, 2015 7:08 p.m., "Kolb, Christoph" <[email protected]> escribió: > Hi Federico, > > I am not sure how you solved your previous problem, and wonder why the > AddBaseRenderer Method is needed. This one is actually meant to register a > new seperate renderer for the OverlayManager to manage. I would not > recommend to use it for the registration of foreground renderers. > Can you please explain how you want to use the foreground renderers? > > Regards > Christoph > > ________________________________________ > Von: Federico Milano [[email protected]] > Gesendet: Montag, 7. September 2015 22:04 > An: Kolb, Christoph > Cc: [email protected] > Betreff: Re: [mitk-users] Overlay in 3D problem > > Thank you Christoph. Another question, if I'm doing this in a VtkMapper, > where should I add the renderer? Because if I do it in > > GenerateDataForRenderer() > > using something like > > mitk::OverlayManager::AddBaseRenderer() > > then I end up changing the vtkRendererCollection of the vtkRenderWindow > while it is being traversed (GenerateDataForRenderer() is indirectly called > by the Render() method of vtkRendererCollection). That invalidates the > iterator and produces undefined behaviour (in my case, an Access Violation > in the third overlay I add). > > It is clear to me how to add foreground renderers from other contexts, but > I don't know how to add them in VtkMapper derived classes. > > Thanks in advance, > > Federico > > > On Sun, Aug 30, 2015 at 1:47 PM, Kolb, Christoph < > [email protected]<mailto:[email protected]>> wrote: > Hi Federico, > > prior to the 2015.05 Release, we have added a flag to the Overlays, that > forces them to be drawn in front: > <http://bugs.mitk.org/show_bug.cgi?id=18536> > http://bugs.mitk.org/show_bug.cgi?id=18536 > > http://docs.mitk.org/nightly-qt4/classmitk_1_1OverlayManager.html#a78c770eb3f088025c9b8026d3c51fa7e > > Alternatively you could use the TextOverlay2D which is always on top. The > difference is that this ones position is defined on the display. > > Regards > Christoph > > On Sun, 2015-08-30 at 02:14 +0200, Federico Milano wrote: > Hi. I'm trying to display an overlay in a 3D window. I'm using this > document< > http://mitk.org/images/d/d1/BugSquashingSeminars$Overlays_in_MITK.pdf>: > as a guide. I've created a plugin that adds a TextOverlay3D to the 3D > window renderer overlay manager (exaclty as it is stated in that document). > The problem is that the TextOverlay3D is not being drawn over the scene. If > you position, for example, a cube in front of it, it occludes the text (see > attached screenshot). I'm using MITK 2014.03. > > I'll really appreciate any hint. > > Thanks, > > Federico > > > > ------------------------------------------------------------------------------ > _______________________________________________ > mitk-users mailing list > [email protected]<mailto:[email protected]> > https://lists.sourceforge.net/lists/listinfo/mitk-users > >
------------------------------------------------------------------------------
_______________________________________________ mitk-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mitk-users
