]> Creatis software - cpPlugins.git/blobdiff - lib/cpExtensions/Visualization/ImageViewerActors.h
yet another refactoring
[cpPlugins.git] / lib / cpExtensions / Visualization / ImageViewerActors.h
diff --git a/lib/cpExtensions/Visualization/ImageViewerActors.h b/lib/cpExtensions/Visualization/ImageViewerActors.h
new file mode 100644 (file)
index 0000000..b12e9c8
--- /dev/null
@@ -0,0 +1,64 @@
+#ifndef __cpExtensions__Visualization__ImageViewerActors__h__
+#define __cpExtensions__Visualization__ImageViewerActors__h__
+
+#include <cpExtensions/Visualization/ImageSliceActors.h>
+#include <vtkSmartPointer.h>
+
+// -------------------------------------------------------------------------
+class vtkTextActor;
+
+// -------------------------------------------------------------------------
+namespace cpExtensions
+{
+  namespace Visualization
+  {
+    class CursorActors;
+
+    /**
+     */
+    class cpExtensions_EXPORT ImageViewerActors
+      : public ImageSliceActors
+    {
+    public:
+      typedef ImageViewerActors Self;
+
+    public:
+      vtkTypeMacro( ImageViewerActors, ImageSliceActors );
+
+    public:
+      static Self* New( );
+
+      virtual void SetImage(
+        vtkImageData* image, int orientation
+        ) cpExtensions_OVERRIDE;
+
+      void SetCursor( double* pos, bool neg );
+      void SetSuperCursor( double* pos, bool neg );
+      void HideViewerActors( );
+
+    protected:
+      ImageViewerActors( );
+      virtual ~ImageViewerActors( );
+
+      void _CorrectPosition( double* pos, int* ijk );
+      void _ShowText( double* pos );
+
+    private:
+      // Purposely not implemented
+      ImageViewerActors( const Self& );
+      Self& operator=( const Self& );
+
+    protected:
+      vtkSmartPointer< CursorActors > m_Cursor;
+      vtkSmartPointer< CursorActors > m_SuperCursor;
+      vtkSmartPointer< vtkTextActor > m_Text;
+      char m_TextBuffer[ 1024 ];
+    };
+
+  } // ecapseman
+
+} // ecapseman
+
+#endif // __cpExtensions__Visualization__ImageViewerActors__h__
+
+// eof - $RCSfile$