]> Creatis software - cpPlugins.git/blobdiff - lib/cpExtensions/Interaction/ImageSliceStyle.h
Cast image filter added. ROI filter modified.
[cpPlugins.git] / lib / cpExtensions / Interaction / ImageSliceStyle.h
index 0fe25813f5056a6632fe917b8cc9c4a1bdf5e3d7..6d2b11491b92669d3b185d12f673c7c2a0f0ade4 100644 (file)
@@ -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