]> Creatis software - cpPlugins.git/blobdiff - lib/cpExtensions/Visualization/CursorActors.h
yet another refactoring
[cpPlugins.git] / lib / cpExtensions / Visualization / CursorActors.h
diff --git a/lib/cpExtensions/Visualization/CursorActors.h b/lib/cpExtensions/Visualization/CursorActors.h
new file mode 100644 (file)
index 0000000..77a6d8e
--- /dev/null
@@ -0,0 +1,70 @@
+#ifndef __cpExtensions__Visualization__CursorActors__h__
+#define __cpExtensions__Visualization__CursorActors__h__
+
+#include <cpExtensions/Config.h>
+#include <vtkPropCollection.h>
+#include <vtkSmartPointer.h>
+
+// -------------------------------------------------------------------------
+class vtkActor;
+class vtkPolyDataMapper;
+class vtkProperty;
+
+// -------------------------------------------------------------------------
+namespace cpExtensions
+{
+  namespace Visualization
+  {
+    class LineSource;
+
+    /**
+     */
+    class cpExtensions_EXPORT CursorActors
+      : public vtkPropCollection
+    {
+    public:
+      typedef CursorActors Self;
+
+    public:
+      vtkTypeMacro( CursorActors, vtkPropCollection );
+
+    public:
+      static Self* New( );
+
+      virtual void Modified( ) cpExtensions_OVERRIDE;
+
+      void SetImageBounds( double* bounds );
+      void SetImageOrientation( int orientation );
+      void SetCursor( double* pos, bool neg );
+
+      vtkProperty* GetProperty( unsigned int i );
+      const vtkProperty* GetProperty( unsigned int i ) const;
+
+      void SetVisibility( int v );
+      void VisibilityOn( );
+      void VisibilityOff( );
+
+    protected:
+      CursorActors( );
+      virtual ~CursorActors( );
+
+    private:
+      // Purposely not implemented
+      CursorActors( const Self& );
+      Self& operator=( const Self& );
+
+    protected:
+      vtkSmartPointer< LineSource >        m_Lines[ 2 ];
+      vtkSmartPointer< vtkPolyDataMapper > m_Mappers[ 2 ];
+      vtkSmartPointer< vtkActor >          m_Actors[ 2 ];
+      double m_Bounds[ 6 ];
+      int    m_Orientation;
+    };
+
+  } // ecapseman
+
+} // ecapseman
+
+#endif // __cpExtensions__Visualization__CursorActors__h__
+
+// eof - $RCSfile$