]> Creatis software - cpPlugins.git/blob - lib/cpExtensions/Visualization/CursorActors.h
...
[cpPlugins.git] / lib / cpExtensions / Visualization / CursorActors.h
1 #ifndef __cpExtensions__Visualization__CursorActors__h__
2 #define __cpExtensions__Visualization__CursorActors__h__
3
4 #include <cpExtensions/Config.h>
5 #include <vtkPropCollection.h>
6 #include <vtkSmartPointer.h>
7
8 // -------------------------------------------------------------------------
9 class vtkActor;
10 class vtkPolyDataMapper;
11 class vtkProperty;
12
13 // -------------------------------------------------------------------------
14 namespace cpExtensions
15 {
16   namespace Visualization
17   {
18     class LineSource;
19
20     /**
21      */
22     class cpExtensions_EXPORT CursorActors
23       : public vtkPropCollection
24     {
25     public:
26       typedef CursorActors Self;
27
28     public:
29       vtkTypeMacro( CursorActors, vtkPropCollection );
30
31     public:
32       static Self* New( );
33
34       virtual void Modified( ) cpExtensions_OVERRIDE;
35
36       void SetImageBounds( double* bounds );
37       void SetImageOrientation( int orientation );
38       void SetCursor( double* pos, bool neg );
39
40       vtkProperty* GetProperty( unsigned int i );
41       const vtkProperty* GetProperty( unsigned int i ) const;
42
43       void SetVisibility( int v );
44       void VisibilityOn( );
45       void VisibilityOff( );
46
47     protected:
48       CursorActors( );
49       virtual ~CursorActors( );
50
51     private:
52       // Purposely not implemented
53       CursorActors( const Self& );
54       Self& operator=( const Self& );
55
56     protected:
57       vtkSmartPointer< LineSource >        m_Lines[ 2 ];
58       vtkSmartPointer< vtkPolyDataMapper > m_Mappers[ 2 ];
59       vtkSmartPointer< vtkActor >          m_Actors[ 2 ];
60       double m_Bounds[ 6 ];
61       int    m_Orientation;
62     };
63
64   } // ecapseman
65
66 } // ecapseman
67
68 #endif // __cpExtensions__Visualization__CursorActors__h__
69
70 // eof - $RCSfile$