X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpExtensions%2FInteraction%2FImageInteractorStyle.h;h=ec54f5e33481b3c3acfd25808d0836cd133dd940;hb=e2fb8817731f6231d34941a208e46b36dad425b2;hp=7664c137ff1b943d36e6659830276d7b1a66fd2f;hpb=4a793c6b8f400b2303a3f69680aea22948d8ecc6;p=cpPlugins.git diff --git a/lib/cpExtensions/Interaction/ImageInteractorStyle.h b/lib/cpExtensions/Interaction/ImageInteractorStyle.h index 7664c13..ec54f5e 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 @@ -37,12 +42,35 @@ namespace cpExtensions 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 ); + unsigned int GetNumberOfSeeds( ) const; + void GetSeedAsPoint( unsigned int id, double pos[ 3 ] ) const; + void GetSeedAsIndex( unsigned int id, int pos[ 3 ] ) const; + protected: ImageInteractorStyle( ); virtual ~ImageInteractorStyle( ); @@ -56,6 +84,8 @@ namespace cpExtensions protected: vtkSmartPointer< vtkPropPicker > m_PropPicker; + + TSeedWidget* m_SeedWidget; }; } // ecapseman