1 #ifndef __CPEXTENSIONS__VISUALIZATION__MPRACTORS__H__
2 #define __CPEXTENSIONS__VISUALIZATION__MPRACTORS__H__
6 #include <cpExtensions/cpExtensions_Export.h>
7 #include <cpExtensions/Visualization/ImageSliceActors.h>
11 namespace Visualization
15 class cpExtensions_EXPORT MPRActors
16 : public vtkPropCollection
19 typedef MPRActors Self;
21 typedef ImageSliceActors::TCursorCommand TCursorCommand;
22 typedef ImageSliceActors::TMouseCommand TMouseCommand;
23 typedef ImageSliceActors::TMouseWheelCommand TMouseWheelCommand;
24 typedef ImageSliceActors::TKeyCommand TKeyCommand;
27 vtkTypeMacro( MPRActors, vtkPropCollection );
31 static MPRActors* New( );
33 void AddCursorCommand( TCursorCommand command, void* data )
35 this->Slices[ 0 ][ 0 ]->AddCursorCommand( command, data );
36 this->Slices[ 0 ][ 1 ]->AddCursorCommand( command, data );
37 this->Slices[ 0 ][ 2 ]->AddCursorCommand( command, data );
40 ImageSliceActors* GetSliceActors( const int& i ) const;
42 int AddInputConnection( vtkAlgorithmOutput* aout );
43 int AddInputData( vtkImageData* new_image );
44 unsigned int GetNumberOfImages( ) const;
60 void SetLookupTableAsColor(
61 unsigned int i, double r, double g, double b
66 return( this->Slices[ 0 ][ 0 ]->GetWindow( ) );
70 return( this->Slices[ 0 ][ 0 ]->GetLevel( ) );
74 int GetSliceNumberMinValue( const int& axis ) const;
75 int GetSliceNumberMaxValue( const int& axis ) const;
76 int GetSlice( const int& axis ) const;
77 void SetSlice( const int& axis, const int& slice );
78 void SetSlice( const int& axis, const double& slice );
83 virtual ~MPRActors( );
85 vtkImageData* _Image( unsigned int i ) const;
86 void _Update( unsigned int i );
88 static void _SetSlices( double* pos, int axis, void* data );
91 // Purposely not implemented
92 MPRActors( const Self& );
93 Self& operator=( const Self& );
96 vtkSmartPointer< vtkActor > ImageOutlineActor;
97 vtkSmartPointer< ImageSliceActors > Slices[ 2 ][ 3 ];
99 std::vector< TCursorCommand > CursorCommands;
100 std::vector< TMouseCommand > MouseCommands;
101 std::vector< TMouseCommand > MouseClickCommands;
102 std::vector< TMouseCommand > MouseDoubleClickCommands;
103 std::vector< TMouseWheelCommand > MouseWheelCommands;
104 std::vector< TKeyCommand > KeyCommands;
111 #endif // __CPEXTENSIONS__VISUALIZATION__MPRACTORS__H__