X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpExtensions%2FVisualization%2FMPRActors.h;h=8b88fdc2687ca93e7ff32ddd36a0f0c095c26dbc;hb=91f750d8a54e87cdd626566aad3d80940ae041fd;hp=85cee5949c2fba29d3173c290ff1f01613637a98;hpb=8db7a40f2ef8530457959a51a4d2a7f012d0b7a3;p=cpPlugins.git diff --git a/lib/cpExtensions/Visualization/MPRActors.h b/lib/cpExtensions/Visualization/MPRActors.h index 85cee59..8b88fdc 100644 --- a/lib/cpExtensions/Visualization/MPRActors.h +++ b/lib/cpExtensions/Visualization/MPRActors.h @@ -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