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()->GetRenderWindow4()->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