]> Creatis software - cpPlugins.git/blob - lib/cpExtensions/Visualization/ImageViewerActors.h
...
[cpPlugins.git] / lib / cpExtensions / Visualization / ImageViewerActors.h
1 #ifndef __cpExtensions__Visualization__ImageViewerActors__h__
2 #define __cpExtensions__Visualization__ImageViewerActors__h__
3
4 #include <cpExtensions/Visualization/ImageSliceActors.h>
5 #include <vtkSmartPointer.h>
6
7 // -------------------------------------------------------------------------
8 class vtkTextActor;
9
10 // -------------------------------------------------------------------------
11 namespace cpExtensions
12 {
13   namespace Visualization
14   {
15     class CursorActors;
16
17     /**
18      */
19     class cpExtensions_EXPORT ImageViewerActors
20       : public ImageSliceActors
21     {
22     public:
23       typedef ImageViewerActors Self;
24
25     public:
26       vtkTypeMacro( ImageViewerActors, ImageSliceActors );
27
28     public:
29       static Self* New( );
30
31       virtual void SetImage(
32         vtkImageData* image, int orientation
33         ) cpExtensions_OVERRIDE;
34
35       void SetCursor( double* pos, bool neg );
36       void SetSuperCursor( double* pos, bool neg );
37       void HideViewerActors( );
38
39     protected:
40       ImageViewerActors( );
41       virtual ~ImageViewerActors( );
42
43       void _CorrectPosition( double* pos, int* ijk );
44       void _ShowText( double* pos );
45
46     private:
47       // Purposely not implemented
48       ImageViewerActors( const Self& );
49       Self& operator=( const Self& );
50
51     protected:
52       vtkSmartPointer< CursorActors > m_Cursor;
53       vtkSmartPointer< CursorActors > m_SuperCursor;
54       vtkSmartPointer< vtkTextActor > m_Text;
55       char m_TextBuffer[ 1024 ];
56     };
57
58   } // ecapseman
59
60 } // ecapseman
61
62 #endif // __cpExtensions__Visualization__ImageViewerActors__h__
63
64 // eof - $RCSfile$