]> Creatis software - cpPlugins.git/blobdiff - lib/cpExtensions/Visualization/ImageSliceActors.h
Widget integration (step 6/6): Interactive architecture finished. Needs to be tested...
[cpPlugins.git] / lib / cpExtensions / Visualization / ImageSliceActors.h
index 22bfe6a7f39ee551158ffbe80cfa67066676c559..6c97448f48c5c0cfcec9192ccc49642225da77f4 100644 (file)
@@ -38,6 +38,9 @@ namespace cpExtensions
       typedef ImageSliceActors Self;
 
       typedef void ( *TCursorCommand )( double*, int, void* );
+      typedef ImageInteractorStyle::TMouseCommand      TMouseCommand;
+      typedef ImageInteractorStyle::TMouseWheelCommand TMouseWheelCommand;
+      typedef ImageInteractorStyle::TKeyCommand        TKeyCommand;
 
     public:
       vtkTypeMacro( ImageSliceActors, vtkPropCollection );
@@ -51,6 +54,15 @@ namespace cpExtensions
       // Creation
       static ImageSliceActors* New( );
 
+      void AddCursorCommand( TCursorCommand command, void* data )
+      {
+        this->CursorCommands.push_back(
+          std::pair< TCursorCommand, void* >(
+            command, data
+            )
+          );
+      }
+
       void AddInputConnection( vtkAlgorithmOutput* aout, int axis = 2 );
       void AddInputData( vtkImageData* data, int axis = 2 );
       void Clear( );
@@ -166,6 +178,14 @@ namespace cpExtensions
       TCursorCommand SlicesCommand;
       void* SlicesData;
 
+      // Associated commands
+      std::vector< std::pair< TCursorCommand, void* > > CursorCommands;
+      std::vector< TMouseCommand >      MouseCommands;
+      std::vector< TMouseCommand >      MouseClickCommands;
+      std::vector< TMouseCommand >      MouseDoubleClickCommands;
+      std::vector< TMouseWheelCommand > MouseWheelCommands;
+      std::vector< TKeyCommand >        KeyCommands;
+
       // Other associated actors
       typedef std::pair< vtkAlgorithm*, vtkActor* > TAssociatedActor;
       typedef std::vector< TAssociatedActor >       TAssociatedActors;