]> Creatis software - cpPlugins.git/blobdiff - lib/cpExtensions/Interaction/ImageSliceStyle.h
Spline widget added.
[cpPlugins.git] / lib / cpExtensions / Interaction / ImageSliceStyle.h
index 0fe25813f5056a6632fe917b8cc9c4a1bdf5e3d7..9fa34499430c1672c0ab5fde7e904f274b14c829 100644 (file)
@@ -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