X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpExtensions%2FInteraction%2FImageSliceStyle.h;h=6d2b11491b92669d3b185d12f673c7c2a0f0ade4;hb=f1747c7248d5eead5ea9d7e57bda0b081bcef065;hp=0fe25813f5056a6632fe917b8cc9c4a1bdf5e3d7;hpb=a422d88602e9b49085ccfab0ef0f9f2d93fb6a1e;p=cpPlugins.git diff --git a/lib/cpExtensions/Interaction/ImageSliceStyle.h b/lib/cpExtensions/Interaction/ImageSliceStyle.h index 0fe2581..6d2b114 100644 --- a/lib/cpExtensions/Interaction/ImageSliceStyle.h +++ b/lib/cpExtensions/Interaction/ImageSliceStyle.h @@ -7,6 +7,7 @@ // ------------------------------------------------------------------------- class vtkPropPicker; +class vtkTextActor; // ------------------------------------------------------------------------- namespace cpExtensions @@ -14,6 +15,7 @@ namespace cpExtensions namespace Visualization { class CursorActors; + class LUTImageActor; class WindowLevelImageActor; } namespace Interaction @@ -26,15 +28,24 @@ namespace cpExtensions public: typedef ImageSliceStyle Self; typedef cpExtensions::Visualization::CursorActors TCursor; + typedef cpExtensions::Visualization::LUTImageActor TLUTActor; typedef cpExtensions::Visualization::WindowLevelImageActor TWLActor; 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 +54,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 +61,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 +72,11 @@ namespace cpExtensions protected: vtkSmartPointer< vtkPropPicker > m_PropPicker; - vtkSmartPointer< TWLActor > m_WLActor; - vtkSmartPointer< TCursor > m_Cursor; - /* TODO - vtkSmartPointer< cpExtensions::Visualization::ImageViewerActors > m_Actors; - */ + vtkSmartPointer< TLUTActor > m_LUTActor; + vtkSmartPointer< TWLActor > m_WLActor; + vtkSmartPointer< TCursor > m_Cursor; + vtkSmartPointer< vtkTextActor > m_Text; + char m_TextBuffer[ 1024 ]; }; } // ecapseman