Dear Sebastian!

We tried to reproduce the vtk error message, unfortunately we weren't able to. 
We modified the Tutorial Step1 project and added mitkext volumerendering to it. 
We removed the Datanode at the end of the method but the error didn't occur.  
Most likely the Tutorial Step 1 doesn't have this complex environment compared 
to the ExtApp.
Could you please send us a modified example code (e.g. Step 1..), where this 
error occurs . Please also tell us the MITK Version (git hash of the 
master-commit) you are using.  

Sincerely,
Markus on behalf of the MITK team 



> -----Original Message-----
> From: sebastian ordas [mailto:[email protected]]
> Sent: Thu 15.Mar/3 2012 4:29 AM
> To: [email protected]
> Subject: [mitk-users] graphics resources not being released if a node is
> removed before app exits
> 
> Dear MITK Team,
> 
> The method mitk::VtkPropRenderer::ReleaseGraphicsResources(vtkWindow
> *renWin)
> is called when the render windows are destroyed at application exit:
> 
> mitk::RenderWindowBase::Destroy()
> {
> ...
> m_RenderProp->Delete();
> }
> 
> In the case a node is deleted during the application life time, we should
> somehow explicitly call
> 
> // code snippet
> 
> mitk::Mapper::Pointer mapper =
> node->GetMapper(mitk::BaseRenderer::Standard3D);
> if (mapper.IsNotNull())
> {
> 
> mapper->ReleaseGraphicsResources(this->GetActiveStdMultiWidget()-
> >GetRen
> mapper->derWindow4()->GetVtkRenderWindow());
> }
> this->GetDataStorage()->Remove(node);
> node->SetData(NULL);
> node = NULL;
> 
> If you don´t do that, a vtk error complaining about "data being deleted
> before graphics resources are released" pops up.
> This would happen e.g. in the case you delete an image node with its volume
> render property set on.
> 
> I could not try it myself in ExtApp since it is not running in my setting 
> (have to
> fix some dll issue and answer Sascha´s last email to me); but I guess the
> described error would appear if you delete a node from data manager with
> GPU volume rendering ON
> 
> In my application, the code above solves this issue in places where the
> StdMultiWidget is available, and therefore a VtkRenderWindow (e.g. in
> DataManager or in a plugin), but not from a mitk::Tool-derived class in which
> an execute operation is used ( ExecuteOperation(doOp) ) to keep some
> processing in the Undo/Redo stack.
> 
> Is my analysis correct?
> Please let me know what you think
> 
> thank you,
> sebastian
> 
> ------------------------------------------------------------------------------
> This SF email is sponsosred by:
> Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-
> msazure _______________________________________________
> mitk-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mitk-users

------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to