]> Creatis software - cpPlugins.git/blob - lib/cpExtensions/Interaction/ImageInteractorStyle.h
7664c137ff1b943d36e6659830276d7b1a66fd2f
[cpPlugins.git] / lib / cpExtensions / Interaction / ImageInteractorStyle.h
1 #ifndef __CPEXTENSIONS__INTERACTION__IMAGEINTERACTORSTYLE__H__
2 #define __CPEXTENSIONS__INTERACTION__IMAGEINTERACTORSTYLE__H__
3
4 #include <cpExtensions/Interaction/BaseInteractorStyle.h>
5
6 #include <vector>
7
8 #include <vtkSmartPointer.h>
9 #include <vtkPropPicker.h>
10
11 // Forward definitions
12 class vtkImageActor;
13
14 namespace cpExtensions
15 {
16   namespace Interaction
17   {
18     /**
19      */
20     class cpExtensions_EXPORT ImageInteractorStyle
21       : public BaseInteractorStyle
22     {
23     public:
24       typedef ImageInteractorStyle Self;
25       vtkTypeMacro( ImageInteractorStyle, BaseInteractorStyle );
26
27       // Callbacks types
28       typedef Superclass::TMouseCommand            TMouseCommand;
29       typedef Superclass::TMouseWheelCommand       TMouseWheelCommand;
30       typedef Superclass::TKeyCommand              TKeyCommand;
31       typedef Superclass::TVoidCommand             TVoidCommand;
32       typedef Superclass::TMouseMoveCommand        TMouseMoveCommand;
33       typedef Superclass::TMouseClickCommand       TMouseClickCommand;
34       typedef Superclass::TMouseDoubleClickCommand TMouseDoubleClickCommand;
35       typedef Superclass::TExposeCommand           TExposeCommand;
36       typedef Superclass::TConfigureCommand        TConfigureCommand;
37       typedef Superclass::TEnterCommand            TEnterCommand;
38       typedef Superclass::TLeaveCommand            TLeaveCommand;
39
40     public:
41       static Self* New( );
42
43       // Data for local picker
44       virtual void AssociateImageActor( vtkImageActor* actor );
45
46     protected:
47       ImageInteractorStyle( );
48       virtual ~ImageInteractorStyle( );
49
50       virtual bool _PickPosition( int idx[ 2 ], double pos[ 3 ] );
51
52     private:
53       // Purposely not implemented
54       ImageInteractorStyle( const Self& );
55       Self& operator=( const Self& );
56
57     protected:
58       vtkSmartPointer< vtkPropPicker > m_PropPicker;
59     };
60
61   } // ecapseman
62
63 } // ecapseman
64
65 #endif // __CPEXTENSIONS__INTERACTION__IMAGEINTERACTORSTYLE__H__
66
67 // eof - $RCSfile$