]> Creatis software - cpPlugins.git/blobdiff - lib/cpExtensions/Interaction/ImageInteractorStyle.cxx
Pipeline editor added.
[cpPlugins.git] / lib / cpExtensions / Interaction / ImageInteractorStyle.cxx
index bf82ba68140b1bb38ef89a2d1193b6240f4c62af..0e6dce0235da38df90e2f4a6eb5e38bab91ec51b 100644 (file)
@@ -1,5 +1,6 @@
 #include <cpExtensions/Interaction/ImageInteractorStyle.h>
 
+#include <vtkCommand.h>
 #include <vtkImageActor.h>
 #include <vtkPropCollection.h>
 #include <vtkProperty.h>
@@ -85,6 +86,34 @@ SeedWidgetOff( )
   } // fi
 }
 
+// -------------------------------------------------------------------------
+void cpExtensions::Interaction::ImageInteractorStyle::
+SetSeedWidgetCommand( vtkCommand* cmd )
+{
+  if( cmd == NULL || this->m_SeedWidget == NULL )
+    return;
+  this->m_SeedWidget->Widget->
+    AddObserver( vtkCommand::PlacePointEvent, cmd );
+}
+
+// -------------------------------------------------------------------------
+unsigned int cpExtensions::Interaction::ImageInteractorStyle::
+GetNumberOfSeeds( ) const
+{
+  if( this->m_SeedWidget != NULL )
+    return( this->m_SeedWidget->Representation->GetNumberOfSeeds( ) );
+  else
+    return( 0 );
+}
+
+// -------------------------------------------------------------------------
+void cpExtensions::Interaction::ImageInteractorStyle::
+GetSeed( unsigned int id, double pos[ 3 ] ) const
+{
+  if( this->m_SeedWidget != NULL )
+    this->m_SeedWidget->Representation->GetSeedWorldPosition( id, pos );
+}
+
 // -------------------------------------------------------------------------
 cpExtensions::Interaction::ImageInteractorStyle::
 ImageInteractorStyle( )