X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpExtensions%2FVisualization%2FMPRActors.h;h=85cee5949c2fba29d3173c290ff1f01613637a98;hb=2553991938011b002691361f0ed4ae95a552a686;hp=72389be28af55b86d94c96ddc11d503d2aee0103;hpb=96914c02e23847c9d4ecdd085da689e61abb58f8;p=cpPlugins.git diff --git a/lib/cpExtensions/Visualization/MPRActors.h b/lib/cpExtensions/Visualization/MPRActors.h index 72389be..85cee59 100644 --- a/lib/cpExtensions/Visualization/MPRActors.h +++ b/lib/cpExtensions/Visualization/MPRActors.h @@ -6,17 +6,6 @@ #include #include -#include -#include -#include - -// ------------------------------------------------------------------------- -class vtkAlgorithmOutput; -class vtkImageData; -class vtkRenderer; -class vtkScalarsToColors; - -// ------------------------------------------------------------------------- namespace cpExtensions { namespace Visualization @@ -39,41 +28,26 @@ namespace cpExtensions ImageSliceActors* GetSliceActors( const int& i ) const; int AddInputConnection( vtkAlgorithmOutput* aout ); - int AddInputData( vtkImageData* image ); - - /* - void SetInputConnection( vtkAlgorithmOutput* aout ); - void SetInputData( vtkImageData* image ); - */ - - void PushDataInto( - vtkRenderer* x, - vtkRenderer* y, - vtkRenderer* z, - vtkRenderer* w + int AddInputData( vtkImageData* new_image ); + unsigned int GetNumberOfImages( ) const; + + void PushActorsInto( + vtkRenderWindow* x, + vtkRenderWindow* y, + vtkRenderWindow* z, + vtkRenderWindow* w ); - void PopDataFrom( - vtkRenderer* x, - vtkRenderer* y, - vtkRenderer* z, - vtkRenderer* w + void PopActorsFrom( + vtkRenderWindow* x, + vtkRenderWindow* y, + vtkRenderWindow* z, + vtkRenderWindow* w ); - // Lookup table methods - void SetLookupTable( unsigned int i, vtkScalarsToColors* lut ); - vtkScalarsToColors* GetLookupTable( unsigned int i ) const; - - // Grayscale window/level lookup - void SetLookupTableToWindowLevel( unsigned int i ); - double GetMinWindow( unsigned int i ) const; - double GetMaxWindow( unsigned int i ) const; - double GetMinLevel( unsigned int i ) const; - double GetMaxLevel( unsigned int i ) const; - double GetWindow( unsigned int i ) const; - double GetLevel( unsigned int i ) const; - void SetWindow( unsigned int i, const double& w ); - void SetLevel( unsigned int i, const double& l ); - void ResetWindowLevel( unsigned int i ); + // Color lookup table + void SetLookupTableAsColor( + unsigned int i, double r, double g, double b + ); // Slice access int GetSliceNumberMinValue( const int& axis ) const; @@ -90,13 +64,14 @@ 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; vtkSmartPointer< vtkActor > ImageOutlineActor; vtkSmartPointer< ImageSliceActors > Slices[ 2 ][ 3 ]; };