1 #ifndef __CPEXTENSIONS__VISUALIZATION__IMAGESLICEACTORS__H__
2 #define __CPEXTENSIONS__VISUALIZATION__IMAGESLICEACTORS__H__
4 #include <cpExtensions/cpExtensions_Export.h>
9 #include <vtkImageActor.h>
10 #include <vtkImageSliceMapper.h>
11 #include <vtkPolyData.h>
12 #include <vtkPolyDataMapper.h>
13 #include <vtkPropCollection.h>
14 #include <vtkSmartPointer.h>
15 #include <vtkTextActor.h>
17 // -------------------------------------------------------------------------
18 class vtkAlgorithmOutput;
21 // -------------------------------------------------------------------------
22 namespace cpExtensions
24 namespace Visualization
28 class cpExtensions_EXPORT ImageSliceActors
29 : public vtkPropCollection
32 typedef ImageSliceActors Self;
35 vtkTypeMacro( ImageSliceActors, vtkPropCollection );
39 static ImageSliceActors* New( );
41 void AddInputConnection( vtkAlgorithmOutput* aout, int axis = 0 );
42 void AddInputData( vtkImageData* data, int axis = 0 );
45 unsigned int GetNumberOfImageActors( ) const;
46 vtkImageActor* GetImageActor( unsigned int id );
47 const vtkImageActor* GetImageActor( unsigned int id ) const;
48 vtkTextActor* GetTextActor( );
49 const vtkTextActor* GetTextActor( ) const;
50 vtkActor* GetPlaneActor( );
51 const vtkActor* GetPlaneActor( ) const;
53 void SetInterpolate( bool v );
54 void InterpolateOn( );
55 void InterpolateOff( );
57 double* GetDisplayBounds( ) const;
58 void GetDisplayBounds( double bounds[ 6 ] ) const;
61 int GetSliceNumber( ) const;
62 int GetSliceNumberMinValue( ) const;
63 int GetSliceNumberMaxValue( ) const;
64 void SetSliceNumber( const int& slice );
66 void UpdateText( const double& w, const double& l );
70 virtual ~ImageSliceActors( );
72 void _ConfigureNewInput( int axis );
75 // Purposely not implemented
76 ImageSliceActors( const Self& );
77 Self& operator=( const Self& );
81 std::vector< vtkSmartPointer< vtkImageSliceMapper > > SliceMappers;
82 std::vector< vtkSmartPointer< vtkImageActor > > ImageActors;
86 vtkSmartPointer< vtkPolyData > PlaneSource;
87 vtkSmartPointer< vtkPolyDataMapper > PlaneMapper;
88 char TextBuffer[ 1024 ];
89 vtkSmartPointer< vtkTextActor > TextActor;
90 vtkSmartPointer< vtkActor > PlaneActor;
97 #endif // __CPEXTENSIONS__VISUALIZATION__IMAGESLICEACTORS__H__