X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpExtensions%2FVisualization%2FMPRActors.h;h=5eb3a202003712441265a4aada24d5990166d98f;hb=31e4cf1f3580efa059d3ffad14ba6a15d2372f5c;hp=8b88fdc2687ca93e7ff32ddd36a0f0c095c26dbc;hpb=91f750d8a54e87cdd626566aad3d80940ae041fd;p=cpPlugins.git diff --git a/lib/cpExtensions/Visualization/MPRActors.h b/lib/cpExtensions/Visualization/MPRActors.h index 8b88fdc..5eb3a20 100644 --- a/lib/cpExtensions/Visualization/MPRActors.h +++ b/lib/cpExtensions/Visualization/MPRActors.h @@ -1,8 +1,6 @@ #ifndef __CPEXTENSIONS__VISUALIZATION__MPRACTORS__H__ #define __CPEXTENSIONS__VISUALIZATION__MPRACTORS__H__ -#include - #include #include @@ -18,10 +16,18 @@ namespace cpExtensions public: typedef MPRActors Self; - typedef ImageSliceActors::TCursorCommand TCursorCommand; - typedef ImageSliceActors::TMouseCommand TMouseCommand; - typedef ImageSliceActors::TMouseWheelCommand TMouseWheelCommand; - typedef ImageSliceActors::TKeyCommand TKeyCommand; + typedef ImageSliceActors::TStyle TStyle; + typedef ImageSliceActors::TMouseCommand TMouseCommand; + typedef ImageSliceActors::TMouseWheelCommand TMouseWheelCommand; + typedef ImageSliceActors::TKeyCommand TKeyCommand; + typedef ImageSliceActors::TVoidCommand TVoidCommand; + typedef ImageSliceActors::TMouseMoveCommand TMouseMoveCommand; + typedef ImageSliceActors::TMouseClickCommand TMouseClickCommand; + typedef ImageSliceActors::TMouseDoubleClickCommand TMouseDoubleClickCommand; + typedef ImageSliceActors::TExposeCommand TExposeCommand; + typedef ImageSliceActors::TConfigureCommand TConfigureCommand; + typedef ImageSliceActors::TEnterCommand TEnterCommand; + typedef ImageSliceActors::TLeaveCommand TLeaveCommand; public: vtkTypeMacro( MPRActors, vtkPropCollection ); @@ -30,13 +36,6 @@ 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 ); @@ -56,19 +55,8 @@ namespace cpExtensions vtkRenderWindow* w ); - // Color lookup table - void SetLookupTableAsColor( - 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; @@ -82,10 +70,13 @@ namespace cpExtensions MPRActors( ); virtual ~MPRActors( ); - vtkImageData* _Image( unsigned int i ) const; - void _Update( unsigned int i ); + void _CreateBoundingBox( ); - 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