]> Creatis software - cpPlugins.git/blobdiff - lib/cpExtensions/Visualization/MPRActors.h
More widgets added
[cpPlugins.git] / lib / cpExtensions / Visualization / MPRActors.h
index 24967800a36e80ab093e91bdb64913e2c2f1807a..f4283f48d408c5ce252a502470a5db3a99b6b0ce 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef __CPEXTENSIONS__VISUALIZATION__MPRACTORS__H__
 #define __CPEXTENSIONS__VISUALIZATION__MPRACTORS__H__
 
-#include <vector>
-
 #include <cpExtensions/cpExtensions_Export.h>
 #include <cpExtensions/Visualization/ImageSliceActors.h>
 
@@ -18,10 +16,14 @@ namespace cpExtensions
     public:
       typedef MPRActors Self;
 
-      typedef ImageSliceActors::TCursorCommand     TCursorCommand;
-      typedef ImageSliceActors::TMouseCommand      TMouseCommand;
-      typedef ImageSliceActors::TMouseWheelCommand TMouseWheelCommand;
-      typedef ImageSliceActors::TKeyCommand        TKeyCommand;
+      typedef ImageSliceActors::TBaseStyle          TBaseStyle;
+      typedef ImageSliceActors::TStyle              TStyle;
+      typedef ImageSliceActors::TSlicesCommand      TSlicesCommand;
+      typedef ImageSliceActors::TWindowLevelCommand TWindowLevelCommand;
+      typedef ImageSliceActors::TMouseCommand       TMouseCommand;
+      typedef ImageSliceActors::TMouseWheelCommand  TMouseWheelCommand;
+      typedef ImageSliceActors::TKeyCommand         TKeyCommand;
+      typedef ImageSliceActors::TVoidCommand        TVoidCommand;
 
     public:
       vtkTypeMacro( MPRActors, vtkPropCollection );
@@ -30,13 +32,6 @@ namespace cpExtensions
       // Creation
       static MPRActors* New( );
 
-      void AddCursorCommand( TCursorCommand command, void* data )
-      {
-        this->Slices[ 0 ][ 0 ]->AddSlicesCommand( command, data );
-        this->Slices[ 0 ][ 1 ]->AddSlicesCommand( command, data );
-        this->Slices[ 0 ][ 2 ]->AddSlicesCommand( command, data );
-      }
-
       ImageSliceActors* GetSliceActors( const int& i ) const;
 
       int AddInputConnection( vtkAlgorithmOutput* aout );
@@ -61,14 +56,8 @@ 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( ) );
-      }
+      double GetWindow( );
+      double GetLevel( );
 
       // Slice access
       int GetSliceNumberMinValue( const int& axis ) const;
@@ -85,7 +74,9 @@ namespace cpExtensions
       vtkImageData* _Image( unsigned int i ) const;
       void _Update( unsigned int i );
 
-      static void _SetSlices( double* pos, int axis, void* data );
+      static void _SlicesCommand( double* pos, int axis, void* data );
+      static void _WindowLevelCommand( double window, double level, void* data );
+      static void _RenderCommand( void* data );
 
     private:
       // Purposely not implemented
@@ -95,13 +86,6 @@ 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