1 #ifndef __CPEXTENSIONS__INTERACTION__IMAGEINTERACTORSTYLE__H__
2 #define __CPEXTENSIONS__INTERACTION__IMAGEINTERACTORSTYLE__H__
4 #include <cpExtensions/Interaction/BaseInteractorStyle.h>
8 #include <vtkSmartPointer.h>
9 #include <vtkImageActorPointPlacer.h>
10 #include <vtkPropPicker.h>
11 #include <vtkPointHandleRepresentation3D.h>
12 #include <vtkSeedRepresentation.h>
13 #include <cpExtensions/Interaction/SeedWidget.h>
15 // Forward definitions
19 namespace cpExtensions
25 class cpExtensions_EXPORT ImageInteractorStyle
26 : public BaseInteractorStyle
29 typedef ImageInteractorStyle Self;
30 vtkTypeMacro( ImageInteractorStyle, BaseInteractorStyle );
33 typedef Superclass::TMouseCommand TMouseCommand;
34 typedef Superclass::TMouseWheelCommand TMouseWheelCommand;
35 typedef Superclass::TKeyCommand TKeyCommand;
36 typedef Superclass::TVoidCommand TVoidCommand;
37 typedef Superclass::TMouseMoveCommand TMouseMoveCommand;
38 typedef Superclass::TMouseClickCommand TMouseClickCommand;
39 typedef Superclass::TMouseDoubleClickCommand TMouseDoubleClickCommand;
40 typedef Superclass::TExposeCommand TExposeCommand;
41 typedef Superclass::TConfigureCommand TConfigureCommand;
42 typedef Superclass::TEnterCommand TEnterCommand;
43 typedef Superclass::TLeaveCommand TLeaveCommand;
48 vtkSmartPointer< vtkImageActorPointPlacer > Placer;
49 vtkSmartPointer< vtkPointHandleRepresentation3D > Handle;
50 vtkSmartPointer< vtkSeedRepresentation > Representation;
51 vtkSmartPointer< SeedWidget > Widget;
54 vtkRenderWindowInteractor* interactor, vtkImageActor* actor
63 // Data for local picker
64 virtual void AssociateImageActor( vtkImageActor* actor );
68 void SeedWidgetOff( );
69 void SetSeedWidgetCommand( vtkCommand* cmd );
70 unsigned int GetNumberOfSeeds( ) const;
71 void GetSeedAsPoint( unsigned int id, double pos[ 3 ] ) const;
72 void GetSeedAsIndex( unsigned int id, int pos[ 3 ] ) const;
75 ImageInteractorStyle( );
76 virtual ~ImageInteractorStyle( );
78 virtual bool _PickPosition( int idx[ 2 ], double pos[ 3 ] );
81 // Purposely not implemented
82 ImageInteractorStyle( const Self& );
83 Self& operator=( const Self& );
86 vtkSmartPointer< vtkPropPicker > m_PropPicker;
88 TSeedWidget* m_SeedWidget;
95 #endif // __CPEXTENSIONS__INTERACTION__IMAGEINTERACTORSTYLE__H__