Hi everybody,

I just ran into some very unexpected problem around interaction and wanted to ask if the following is known behavior or even work in progress for somebody:

- a DataNode is already in DataStorage with an interactor assigned
- you want to assign another parent to the DataNode, so to call Remove(node), then Add(node, new_parent) - the interactor is in a unhealthy/dead state now, having lost its DataNode pointer (DataInteractor::DeletedNode got called)

For experimentation, I attached a patch against current master. Apply the patch, activate the Point Set Interaction view, then add a new PointSet, move the mouse over render windows, and have a look at the console. You should see lots of messages like "WARNING: EventStateMachine: Empty DataNode received along with this Event 000000000A780070"

I guess this is another variation of http://bugs.mitk.org/show_bug.cgi?id=19329 where DataInteractor::DeletedNode was introduced.

Has anybody already seen this behavior? Any ideas on how this should be solved?

I created http://bugs.mitk.org/show_bug.cgi?id=19606 for this.

Regards,
Daniel

--
Dr. Daniel Maleike, Mint Medical GmbH
Friedrich-Ebert-Straße 2, 69221 Dossenheim/Heidelberg
Geschäftsführer: Dr. Matthias Baumhauer, Registergericht Mannheim, HRB 709351

diff --git a/Modules/QtWidgetsExt/include/QmitkPointListWidget.h 
b/Modules/QtWidgetsExt/include/QmitkPointListWidget.h
index d409290..e06a69b 100644
--- a/Modules/QtWidgetsExt/include/QmitkPointListWidget.h
+++ b/Modules/QtWidgetsExt/include/QmitkPointListWidget.h
@@ -120,7 +120,7 @@ signals:
     /// signal to inform about cleared or loaded point sets
     void PointListChanged();
 
-protected slots:
+public slots:
     void OnBtnSavePoints();
     void OnBtnLoadPoints();
     void RemoveSelectedPoint();
diff --git 
a/Plugins/org.mitk.gui.qt.pointsetinteraction/src/internal/QmitkPointSetInteractionView.cpp
 
b/Plugins/org.mitk.gui.qt.pointsetinteraction/src/internal/QmitkPointSetInteractionView.cpp
index 860ace9..c5bd1b9 100755
--- 
a/Plugins/org.mitk.gui.qt.pointsetinteraction/src/internal/QmitkPointSetInteractionView.cpp
+++ 
b/Plugins/org.mitk.gui.qt.pointsetinteraction/src/internal/QmitkPointSetInteractionView.cpp
@@ -95,6 +95,10 @@ void QmitkPointSetInteractionView::OnAddPointSetClicked()
   selection.push_back( pointSetNode );
   this->FireNodesSelected( selection );
   this->OnSelectionChanged( selection );
+
+  m_Controls->m_PointListWidget->OnBtnAddPoint(true); // activate interactor
+  this->GetDefaultDataStorage()->Remove(pointSetNode);
+  this->GetDefaultDataStorage()->Add(pointSetNode);
 }
 
 void 
QmitkPointSetInteractionView::OnSelectionChanged(std::vector<mitk::DataNode*> 
nodes)
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140
_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to