]> Creatis software - cpPlugins.git/blobdiff - lib/cpExtensions/Visualization/MPRActors.h
Widget integration (step 6/6): Interactive architecture finished. Needs to be tested...
[cpPlugins.git] / lib / cpExtensions / Visualization / MPRActors.h
index 85cee5949c2fba29d3173c290ff1f01613637a98..8b88fdc2687ca93e7ff32ddd36a0f0c095c26dbc 100644 (file)
@@ -18,6 +18,11 @@ namespace cpExtensions
     public:
       typedef MPRActors Self;
 
+      typedef ImageSliceActors::TCursorCommand     TCursorCommand;
+      typedef ImageSliceActors::TMouseCommand      TMouseCommand;
+      typedef ImageSliceActors::TMouseWheelCommand TMouseWheelCommand;
+      typedef ImageSliceActors::TKeyCommand        TKeyCommand;
+
     public:
       vtkTypeMacro( MPRActors, vtkPropCollection );
 
@@ -25,6 +30,13 @@ namespace cpExtensions
       // Creation
       static MPRActors* New( );
 
+      void AddCursorCommand( TCursorCommand command, void* data )
+      {
+        this->Slices[ 0 ][ 0 ]->AddCursorCommand( command, data );
+        this->Slices[ 0 ][ 1 ]->AddCursorCommand( command, data );
+        this->Slices[ 0 ][ 2 ]->AddCursorCommand( command, data );
+      }
+
       ImageSliceActors* GetSliceActors( const int& i ) const;
 
       int AddInputConnection( vtkAlgorithmOutput* aout );
@@ -49,6 +61,15 @@ namespace cpExtensions
         unsigned int i, double r, double g, double b
         );
 
+      double GetWindow( )
+      {
+        return( this->Slices[ 0 ][ 0 ]->GetWindow( ) );
+      }
+      double GetLevel( )
+      {
+        return( this->Slices[ 0 ][ 0 ]->GetLevel( ) );
+      }
+
       // Slice access
       int GetSliceNumberMinValue( const int& axis ) const;
       int GetSliceNumberMaxValue( const int& axis ) const;
@@ -74,6 +95,13 @@ namespace cpExtensions
     protected:
       vtkSmartPointer< vtkActor >         ImageOutlineActor;
       vtkSmartPointer< ImageSliceActors > Slices[ 2 ][ 3 ];
+
+      std::vector< TCursorCommand >     CursorCommands;
+      std::vector< TMouseCommand >      MouseCommands;
+      std::vector< TMouseCommand >      MouseClickCommands;
+      std::vector< TMouseCommand >      MouseDoubleClickCommands;
+      std::vector< TMouseWheelCommand > MouseWheelCommands;
+      std::vector< TKeyCommand >        KeyCommands;
     };
 
   } // ecapseman