X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpExtensions%2FVisualization%2FMPRActors.h;h=f9fb2132613a1f6214d9bb114305da103758babc;hb=9586180ab9da1ba2778099482b0231b933192719;hp=0aafebef6f5ab227410ac9b594e32dfdda72edde;hpb=1d735deae0ae5e8bff643a59370a03c961ef780c;p=cpPlugins.git diff --git a/lib/cpExtensions/Visualization/MPRActors.h b/lib/cpExtensions/Visualization/MPRActors.h index 0aafebe..f9fb213 100644 --- a/lib/cpExtensions/Visualization/MPRActors.h +++ b/lib/cpExtensions/Visualization/MPRActors.h @@ -6,15 +6,19 @@ #include #include +/* #include #include #include +*/ // ------------------------------------------------------------------------- +/* class vtkAlgorithmOutput; class vtkImageData; class vtkRenderer; class vtkScalarsToColors; +*/ // ------------------------------------------------------------------------- namespace cpExtensions @@ -38,19 +42,20 @@ namespace cpExtensions ImageSliceActors* GetSliceActors( const int& i ) const; - int AddInputConnection( vtkAlgorithmOutput* aout ); - int AddInputData( vtkImageData* image ); - - /* - void SetInputConnection( vtkAlgorithmOutput* aout ); - void SetInputData( vtkImageData* image ); - */ + int AddInputConnection( + vtkAlgorithmOutput* aout, + ImageSliceActors::LUTType lut = ImageSliceActors::LUTType_WindowLevel + ); + int AddInputData( + vtkImageData* image, + ImageSliceActors::LUTType lut = ImageSliceActors::LUTType_WindowLevel + ); - void PushDataInto( - vtkRenderer* x, - vtkRenderer* y, - vtkRenderer* z, - vtkRenderer* w + void PushActorsInto( + vtkRenderWindow* x, + vtkRenderWindow* y, + vtkRenderWindow* z, + vtkRenderWindow* w ); void PopDataFrom( vtkRenderer* x, @@ -58,12 +63,6 @@ namespace cpExtensions vtkRenderer* z, vtkRenderer* w ); - void LinkInteractors( ) - { - this->_Update( 0 ); - this->_Update( 1 ); - this->_Update( 2 ); - } // Lookup table methods void SetLookupTable( unsigned int i, vtkScalarsToColors* lut ); @@ -79,8 +78,17 @@ namespace cpExtensions double GetLevel( unsigned int i ) const; void SetWindow( unsigned int i, const double& w ); void SetLevel( unsigned int i, const double& l ); + void SetWindowLevel( unsigned int i, const double& w, const double& l ); void ResetWindowLevel( unsigned int i ); + // Color lookup table + void SetLookupTableToColor( + unsigned int i, + const double& r = double( 1 ), + const double& g = double( 0 ), + const double& b = double( 0 ) + ); + // Slice access int GetSliceNumberMinValue( const int& axis ) const; int GetSliceNumberMaxValue( const int& axis ) const; @@ -96,13 +104,15 @@ namespace cpExtensions vtkImageData* _Image( unsigned int i ) const; void _Update( unsigned int i ); + static void _SetSlices( double* pos, int axis, void* data ); + private: // Purposely not implemented MPRActors( const Self& ); Self& operator=( const Self& ); protected: - std::vector< vtkSmartPointer< vtkImageMapToColors > > ImageMaps; + // TODO: std::vector< vtkSmartPointer< vtkImageMapToColors > > ImageMaps; vtkSmartPointer< vtkActor > ImageOutlineActor; vtkSmartPointer< ImageSliceActors > Slices[ 2 ][ 3 ]; };