]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Extensions/Visualization/MPRActors.h
YPbPr color model added
[cpPlugins.git] / lib / cpPlugins / Extensions / Visualization / MPRActors.h
index d46fa48f68ba664699ca37d365a9c2cc0ec40aa4..e7af3ff3e4b957bcfc4c59a8186eee108e5682b1 100644 (file)
@@ -6,10 +6,15 @@
 
 #include <vtkActor.h>
 #include <vtkImageMapToColors.h>
-#include <vtkImageMapToWindowLevelColors.h>
 
+// -------------------------------------------------------------------------
+class vtkAlgorithmOutput;
+class vtkImageData;
 class vtkRenderer;
+class vtkScalarsToColors;
+class vtkWindowLevelLookupTable;
 
+// -------------------------------------------------------------------------
 namespace cpPlugins
 {
   namespace Extensions
@@ -34,8 +39,8 @@ namespace cpPlugins
         static MPRActors* New( );
 
         ImageSliceActors* GetSliceActors( const int& i ) const;
+        void SetInputConnection( vtkAlgorithmOutput* aout );
         void SetInputData( vtkImageData* image );
-        void SetSegmentationData( vtkImageData* segmentation );
 
         void PushDataInto(
           vtkRenderer* x,
@@ -50,7 +55,13 @@ namespace cpPlugins
           vtkRenderer* w
           );
 
-        // Window/Level
+        // Lookup table methods
+        vtkScalarsToColors* GetLookupTable( ) const;
+        void SetLookupTable( vtkScalarsToColors* lut );
+
+        // Grayscale window/level lookup
+        vtkWindowLevelLookupTable* GetLookupTableAsWindowLevel( ) const;
+        void SetLookupTableToWindowLevel( );
         double GetMinWindow( ) const;
         double GetMaxWindow( ) const;
         double GetMinLevel( ) const;
@@ -63,7 +74,6 @@ namespace cpPlugins
         void ResetWindowLevel( );
 
         // Slice access
-        vtkPlane* GetSlicePlane( const int& axis ) const;
         int GetSliceNumberMinValue( const int& axis ) const;
         int GetSliceNumberMaxValue( const int& axis ) const;
         int GetSlice( const int& axis ) const;
@@ -78,22 +88,22 @@ namespace cpPlugins
         MPRActors( );
         virtual ~MPRActors( );
 
+        vtkImageData* _InputImage( ) const;
+        void _UpdateSlices( );
+
       private:
         // Purposely not implemented
         MPRActors( const Self& );
         Self& operator=( const Self& );
 
       protected:
-        vtkImageData* Image;
-        vtkImageData* Segmentation;
-
-        vtkSmartPointer< vtkImageMapToWindowLevelColors > ImageToWindowLevel;
-        vtkSmartPointer< vtkImageMapToColors >            SegmentationToColors;
-
-        vtkSmartPointer< vtkActor > ImageOutlineActor;
+        vtkSmartPointer< vtkImageMapToColors > ImageMapToColors;
+        vtkSmartPointer< vtkActor >            ImageOutlineActor;
 
-        typedef cpPlugins::Extensions::Visualization::ImageSliceActors TSlice;
-        vtkSmartPointer< TSlice > Slices[ 3 ];
+        typedef
+          cpPlugins::Extensions::Visualization::ImageSliceActors
+          _TSlice;
+        vtkSmartPointer< _TSlice > Slices[ 3 ];
 
         unsigned int ImageOutlineActorIndex;
       };