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 double* GetDisplayBounds( ) const;
54 void GetDisplayBounds( double bounds[ 6 ] ) const;
57 int GetSliceNumber( ) const;
58 int GetSliceNumberMinValue( ) const;
59 int GetSliceNumberMaxValue( ) const;
60 void SetSliceNumber( const int& slice );
65 virtual ~ImageSliceActors( );
68 // Purposely not implemented
69 ImageSliceActors( const Self& );
70 Self& operator=( const Self& );
74 std::vector< vtkSmartPointer< vtkImageSliceMapper > > SliceMappers;
75 std::vector< vtkSmartPointer< vtkImageActor > > ImageActors;
78 vtkSmartPointer< vtkPolyData > PlaneSource;
79 vtkSmartPointer< vtkPolyDataMapper > PlaneMapper;
80 char TextBuffer[ 1024 ];
81 vtkSmartPointer< vtkTextActor > TextActor;
82 vtkSmartPointer< vtkActor > PlaneActor;
89 #endif // __CPEXTENSIONS__VISUALIZATION__IMAGESLICEACTORS__H__