]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Extensions/Visualization/ImageSliceActors.h
Major refactoring: API-HCI bug corrected.
[cpPlugins.git] / lib / cpPlugins / Extensions / Visualization / ImageSliceActors.h
index c086937e007fa381c8e140e00bd32422619e7986..3d050f38e336061978612bd904b04348e419f82f 100644 (file)
       );                                                                \
   }
 
+// -------------------------------------------------------------------------
 class vtkAlgorithmOutput;
+class vtkImageData;
 
+// -------------------------------------------------------------------------
 namespace cpPlugins
 {
   namespace Extensions
@@ -44,7 +47,6 @@ namespace cpPlugins
         vtkTypeMacro( ImageSliceActors, vtkPropCollection );
 
         cpPlugins_ImageSliceActors( Image, vtkImageActor );
-        cpPlugins_ImageSliceActors( Segmentation, vtkImageActor );
         cpPlugins_ImageSliceActors( Text, vtkTextActor );
         cpPlugins_ImageSliceActors( Plane, vtkActor );
 
@@ -53,7 +55,7 @@ namespace cpPlugins
         static ImageSliceActors* New( );
 
         void SetInputConnection( vtkAlgorithmOutput* aout, int axis );
-        void SetSegmentationConnection( vtkAlgorithmOutput* aout );
+        void SetInputData( vtkImageData* data, int axis );
 
         double* GetDisplayBounds( ) const;
         void GetDisplayBounds( double bounds[ 6 ] ) const;
@@ -63,7 +65,7 @@ namespace cpPlugins
         int GetSliceNumberMinValue( ) const;
         int GetSliceNumberMaxValue( ) const;
         void SetSliceNumber( const int& slice );
-        void UpdateText( const double& w, const double& l );
+        void UpdateText( );
 
       protected:
         ImageSliceActors( );
@@ -75,22 +77,16 @@ namespace cpPlugins
         Self& operator=( const Self& );
 
       protected:
-        vtkAlgorithmOutput* InputAlgorithm;
-        vtkAlgorithmOutput* SegmentationAlgorithm;
-
         vtkSmartPointer< vtkImageSliceMapper > SliceMapper;
-        vtkSmartPointer< vtkImageSliceMapper > SegmentationSliceMapper;
         vtkSmartPointer< vtkPolyData >         PlaneSource;
         vtkSmartPointer< vtkPolyDataMapper >   PlaneMapper;
-        char                                   TextBuffer[ 512 ];
+        char                                   TextBuffer[ 1024 ];
 
         vtkSmartPointer< vtkImageActor > ImageActor;
-        vtkSmartPointer< vtkImageActor > SegmentationActor;
         vtkSmartPointer< vtkTextActor >  TextActor;
         vtkSmartPointer< vtkActor >      PlaneActor;
 
         unsigned int ImageActorIndex;
-        unsigned int SegmentationActorIndex;
         unsigned int TextActorIndex;
         unsigned int PlaneActorIndex;
       };