X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpExtensions%2FInteraction%2FImageSliceStyle.h;h=9fa34499430c1672c0ab5fde7e904f274b14c829;hb=4e55e875e42fe56e3fb92a38015ffa035ac9d0bb;hp=0fe25813f5056a6632fe917b8cc9c4a1bdf5e3d7;hpb=a422d88602e9b49085ccfab0ef0f9f2d93fb6a1e;p=cpPlugins.git diff --git a/lib/cpExtensions/Interaction/ImageSliceStyle.h b/lib/cpExtensions/Interaction/ImageSliceStyle.h index 0fe2581..9fa3449 100644 --- a/lib/cpExtensions/Interaction/ImageSliceStyle.h +++ b/lib/cpExtensions/Interaction/ImageSliceStyle.h @@ -7,6 +7,7 @@ // ------------------------------------------------------------------------- class vtkPropPicker; +class vtkTextActor; // ------------------------------------------------------------------------- namespace cpExtensions @@ -30,11 +31,19 @@ namespace cpExtensions public: vtkTypeMacro( ImageSliceStyle, vtkInteractorStyleImage ); + typedef vtkInteractorStyleImage::Superclass Overclass; public: static Self* New( ); + int GetSliceNumber( ) const; + int GetOrientation( ) const; + virtual void OnMouseMove( ) cpExtensions_OVERRIDE; + virtual void OnMouseWheelForward( ) cpExtensions_OVERRIDE; + virtual void OnMouseWheelBackward( ) cpExtensions_OVERRIDE; + virtual void OnChar( ) cpExtensions_OVERRIDE; + /* TODO cpExtensions::Visualization::ImageViewerActors* GetActors( ); @@ -43,8 +52,6 @@ namespace cpExtensions // Events virtual void OnMouseMove( ) cpExtensions_OVERRIDE; - virtual void OnMouseWheelForward( ) cpExtensions_OVERRIDE; - virtual void OnMouseWheelBackward( ) cpExtensions_OVERRIDE; virtual void OnChar( ) cpExtensions_OVERRIDE; */ @@ -52,8 +59,9 @@ namespace cpExtensions ImageSliceStyle( ); virtual ~ImageSliceStyle( ); - virtual vtkProp* _ImageActor( int i ); - virtual bool _PickPointOnImageActor( int idx[ 2 ], double pnt[ 3 ] ); + bool _PickPointOnImageActor( int idx[ 2 ], double pnt[ 3 ] ); + void _CorrectPosition( double pos[ 3 ], int ijk[ 3 ] ); + void _ShowText( double pos[ 3 ] ); private: // Purposely not implemented @@ -62,11 +70,10 @@ namespace cpExtensions protected: vtkSmartPointer< vtkPropPicker > m_PropPicker; - vtkSmartPointer< TWLActor > m_WLActor; - vtkSmartPointer< TCursor > m_Cursor; - /* TODO - vtkSmartPointer< cpExtensions::Visualization::ImageViewerActors > m_Actors; - */ + vtkSmartPointer< TWLActor > m_WLActor; + vtkSmartPointer< TCursor > m_Cursor; + vtkSmartPointer< vtkTextActor > m_Text; + char m_TextBuffer[ 1024 ]; }; } // ecapseman