X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpExtensions%2FInteraction%2FImageInteractorStyle.h;h=c18ab724c6ff21584f5bd04f3930c93f8da5fa4e;hb=c0627ed97baf80b6751379801fc4d5c377b45467;hp=78bf7da38a9952962cc891e0dd8c75d3b91444b7;hpb=fdd4f2cec18107de380ebd350cb1019eed7c294c;p=cpPlugins.git diff --git a/lib/cpExtensions/Interaction/ImageInteractorStyle.h b/lib/cpExtensions/Interaction/ImageInteractorStyle.h index 78bf7da..c18ab72 100644 --- a/lib/cpExtensions/Interaction/ImageInteractorStyle.h +++ b/lib/cpExtensions/Interaction/ImageInteractorStyle.h @@ -6,9 +6,14 @@ #include #include +#include #include +#include +#include +#include // Forward definitions +class vtkCommand; class vtkImageActor; namespace cpExtensions @@ -24,12 +29,45 @@ namespace cpExtensions typedef ImageInteractorStyle Self; vtkTypeMacro( ImageInteractorStyle, BaseInteractorStyle ); + // Callbacks types + typedef Superclass::TMouseCommand TMouseCommand; + typedef Superclass::TMouseWheelCommand TMouseWheelCommand; + typedef Superclass::TKeyCommand TKeyCommand; + typedef Superclass::TVoidCommand TVoidCommand; + typedef Superclass::TMouseMoveCommand TMouseMoveCommand; + typedef Superclass::TMouseClickCommand TMouseClickCommand; + typedef Superclass::TMouseDoubleClickCommand TMouseDoubleClickCommand; + typedef Superclass::TExposeCommand TExposeCommand; + typedef Superclass::TConfigureCommand TConfigureCommand; + typedef Superclass::TEnterCommand TEnterCommand; + typedef Superclass::TLeaveCommand TLeaveCommand; + + // Widgets + struct TSeedWidget + { + vtkSmartPointer< vtkImageActorPointPlacer > Placer; + vtkSmartPointer< vtkPointHandleRepresentation3D > Handle; + vtkSmartPointer< vtkSeedRepresentation > Representation; + vtkSmartPointer< SeedWidget > Widget; + + TSeedWidget( + vtkRenderWindowInteractor* interactor, vtkImageActor* actor + ); + void On( ); + void Off( ); + }; + public: static Self* New( ); // Data for local picker virtual void AssociateImageActor( vtkImageActor* actor ); + // Widgets + void SeedWidgetOn( ); + void SeedWidgetOff( ); + void SetSeedWidgetCommand( vtkCommand* cmd ); + protected: ImageInteractorStyle( ); virtual ~ImageInteractorStyle( ); @@ -43,6 +81,8 @@ namespace cpExtensions protected: vtkSmartPointer< vtkPropPicker > m_PropPicker; + + TSeedWidget* m_SeedWidget; }; } // ecapseman