]> Creatis software - cpPlugins.git/blobdiff - lib/cpExtensions/Visualization/ImageSliceActors.h
Widget integration (step 2/6). WARNING: IT DOES NOT COMPILE YETgit shortlog !
[cpPlugins.git] / lib / cpExtensions / Visualization / ImageSliceActors.h
index 0e1fdae463622b857a0c655b4da8ca9ee0919df8..091b7bcf89ce399cceabf473b48b6cac111fa671 100644 (file)
@@ -3,11 +3,13 @@
 
 #include <cpExtensions/cpExtensions_Export.h>
 
+#include <utility>
 #include <vector>
 
 #include <vtkActor.h>
 #include <vtkImageActor.h>
 #include <vtkImageSliceMapper.h>
+#include <vtkPlane.h>
 #include <vtkPolyData.h>
 #include <vtkPolyDataMapper.h>
 #include <vtkPropCollection.h>
@@ -49,6 +51,14 @@ namespace cpExtensions
       const vtkTextActor* GetTextActor( ) const;
       vtkActor* GetPlaneActor( );
       const vtkActor* GetPlaneActor( ) const;
+      vtkPlane* GetPlaneFunction( );
+      const vtkPlane* GetPlaneFunction( ) const;
+
+      void AddActor( vtkAlgorithm* algorithm, vtkActor* actor );
+
+      void SetInterpolate( bool v );
+      void InterpolateOn( );
+      void InterpolateOff( );
 
       double* GetDisplayBounds( ) const;
       void GetDisplayBounds( double bounds[ 6 ] ) const;
@@ -59,11 +69,14 @@ namespace cpExtensions
       int GetSliceNumberMaxValue( ) const;
       void SetSliceNumber( const int& slice );
       void UpdateText( );
+      void UpdateText( const double& w, const double& l );
 
     protected:
       ImageSliceActors( );
       virtual ~ImageSliceActors( );
 
+      void _ConfigureNewInput( int axis );
+
     private:
       // Purposely not implemented
       ImageSliceActors( const Self& );
@@ -73,8 +86,11 @@ namespace cpExtensions
       // Multiple actors
       std::vector< vtkSmartPointer< vtkImageSliceMapper > > SliceMappers;
       std::vector< vtkSmartPointer< vtkImageActor > >       ImageActors;
+      std::vector< std::pair< vtkSmartPointer< vtkAlgorithm >, vtkSmartPointer< vtkActor > > >            OtherActors;
+      bool Interpolate;
 
       // Unique objects
+      vtkSmartPointer< vtkPlane >          PlaneFunction;
       vtkSmartPointer< vtkPolyData >       PlaneSource;
       vtkSmartPointer< vtkPolyDataMapper > PlaneMapper;
       char                                 TextBuffer[ 1024 ];