Hello, It's been a month since I started to develop an application using MITK as a toolkit. I need to render two independent 3D windows, to achieve this I choose the QmitkRenderWindowWidget, but inside QmitkRenderWindowWidget.cpp we have the method:
(1) void QmitkRenderWindowWidget::InitializeGUI(); This is a private method called by the constructor and inside it we have this line of code: (2) mitk::RenderingManager::GetInstance()->SetDataStorage(m_DataStorage); This code sets m_DataStorage's content globally, and at the moment we declare QmitkRenderWindowWidget, all other rendering windows are modified. The behavior seems to be a design flaw, because QmitkRenderWindowWidget has a method: (3) void QmitkRenderWindowWidget::SetDataStorage(mitk::DataStorage* dataStorage); I can't tell for sure, but this method seems to set the datastorage only for the current QmitkRenderWindowWidget. So there is no need for (2). Here is the next thing that took my attention: QmitkStdMultiWidget inherits QmitkAbstractMultiWidget, the last one has a method: (4) void QmitkStdMultiWidget::SetDataStorage(mitk::DataStorage* dataStorage); QmitkStdMultiWidget has four rendering widgets, when calling method (4), there are four callings for method (3), one for each rendering widget, but their constructors had already called four times the method (2), and this last method has messed up every other rendering window in the current application. For these reasons, I believe method (2) should be removed as it is there probably by mistake. Also, the algorithms for widgets initialization doesn't appear to consider method (2) existence. I'd welcome any thoughts on this.
_______________________________________________ mitk-users mailing list mitk-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mitk-users