Hi Martin,

indeed, ReleaseGraphicsResources is never called when a DataNode is 
deleted. I did not consider that.
I will try to fix that and update the documentation.

Maybe in the meantime your problem can also be fixed by defining the 
overlay and also keep the overlaymanager as a member of the mapper.
Then in the destructor of the mapper you can just call:
this->m_CurrentOverlayManager->RemoveOverlay(this->m_Overlay.GetPointer());
And the overlay should be gone.

Regards
Christoph

On 03/13/2015 06:46 PM, Martin Klemm wrote:
> Hi everybody,
>
> I tried to implement on overlay showing the name of an object. I found
> the presentation of Christoph (
> http://mitk.org/images/d/d1/BugSquashingSeminars%24Overlays_in_MITK.pdf
> ) about overlays. I implemented it as in line 9. The overlay is shown.
> The problem appears when I delete the node because the overlay stays
> even I added the code to ReleaseGraphicsResources.
>
> By checking the documentation I figured out that the syntax changed and
> I used an old version. Instead of vtkRenderWindow you have to pass the
> baseRenderer directly. But even with this change it is not called. I
> also checked the method of the parent class and it is also not called.
> In my understanding this method has to be called automatically before
> the mapper is destroyed, right? In my case it is not called. So the
> mapper is destroyed and the overlay stays forever. Do I have to call it
> manually before deleting it? If yes how do I do that?
>
> I also found this bug http://bugs.mitk.org/show_bug.cgi?id=13121
> Is there any connection? It looks like that MITK expects the call of
> ReleaseGraphicsResources but does not receive it.
>
> Thanks for your help and have a nice weekend.
>
> Best
>
> Martin


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to