]> Creatis software - cpMesh.git/blobdiff - appli/InteractiveDeformableMeshSegmentation/MainWnd.cxx
Simple flood fill plugin added.
[cpMesh.git] / appli / InteractiveDeformableMeshSegmentation / MainWnd.cxx
index f6d38fafec60d25916e5e45c72b3264471bc4f08..8e55c5a2815c320e3a6f69ef3f5f107c5e292049 100644 (file)
@@ -30,7 +30,9 @@ MainWnd::MainWnd( QWidget* parent )
     m_InputImage( NULL ),
     m_SegmentedImage( NULL ),
     m_ActivePlugin( NULL ),
-    m_ActiveParameters( NULL )
+    m_ActiveParameters( NULL ),
+    m_ActivePluginType( Self::NonePluginType ),
+    m_ActivePluginCategory( Self::NonePluginCategory )
 {
   this->m_UI->setupUi( this );
 
@@ -47,6 +49,12 @@ MainWnd::MainWnd( QWidget* parent )
     this->m_UI->m_3DVTK->GetRenderWindow( )
     );
 
+  // Associate observer
+  this->m_DoubleClickCommand =
+    vtkSmartPointer< DoubleClickCommand >::New( );
+  this->m_DoubleClickCommand->SetMainWnd( this );
+  this->m_MPR->AddDoubleClickObserver( this->m_DoubleClickCommand );
+
   // Orientation marks
   /* TODO
      vtkSmartPointer< vtkAnnotatedCubeActor > oCube =
@@ -339,9 +347,9 @@ _triggered_actionOpenSegmentedImage( )
     */
 
     // Ok, start!
-    this->m_UI->m_XPlaneVTK->GetRenderWindow( )->Render( );
-    this->m_UI->m_YPlaneVTK->GetRenderWindow( )->Render( );
-    this->m_UI->m_ZPlaneVTK->GetRenderWindow( )->Render( );
+    this->m_MPR->Render( 0 );
+    this->m_MPR->Render( 1 );
+    this->m_MPR->Render( 2 );
     this->_UpdateEnabledFlags( );
 
   } // fi