]> Creatis software - cpPlugins.git/blobdiff - lib/cpExtensions/Visualization/MPR3DActors.h
yet another refactoring
[cpPlugins.git] / lib / cpExtensions / Visualization / MPR3DActors.h
diff --git a/lib/cpExtensions/Visualization/MPR3DActors.h b/lib/cpExtensions/Visualization/MPR3DActors.h
new file mode 100644 (file)
index 0000000..07c41ba
--- /dev/null
@@ -0,0 +1,85 @@
+#ifndef __cpExtensions__Visualization__MPR3DActors__h__
+#define __cpExtensions__Visualization__MPR3DActors__h__
+
+#include <cpExtensions/Config.h>
+#include <cpExtensions/Visualization/MeshActor.h>
+#include <vtkPropCollection.h>
+#include <vtkSmartPointer.h>
+#include <map>
+
+// -------------------------------------------------------------------------
+class vtkActor;
+class vtkImageData;
+class vtkPolyData;
+
+// -------------------------------------------------------------------------
+namespace cpExtensions
+{
+  namespace Visualization
+  {
+    class ImageOutlineActor;
+    class ImageSliceActors;
+    class LUTImageActor;
+    class WindowLevelImageActor;
+
+    /**
+     */
+    class cpExtensions_EXPORT MPR3DActors
+      : public vtkPropCollection
+    {
+    public:
+      typedef MPR3DActors Self;
+
+      typedef cpExtensions::Visualization::MeshActor TMeshActor;
+
+    public:
+      vtkTypeMacro( MPR3DActors, vtkPropCollection );
+
+    public:
+      static Self* New( );
+
+      vtkImageData* GetImage( );
+      const vtkImageData* GetImage( ) const;
+
+      WindowLevelImageActor* GetWindowLevelImageActor( int o );
+      const WindowLevelImageActor* GetWindowLevelImageActor( int o ) const;
+
+      LUTImageActor* GetLUTImageActor( int o );
+      const LUTImageActor* GetLUTImageActor( int o ) const;
+
+      ImageOutlineActor* GetImageOutlineActor( int o );
+      const ImageOutlineActor* GetImageOutlineActor( int o ) const;
+
+      int GetSliceNumber( int o ) const;
+      virtual void SetImage( vtkImageData* image );
+      virtual unsigned int AddLUTImage( vtkImageData* image );
+      virtual void SetSliceNumber( int o, int s );
+
+      virtual vtkActor* AddMesh( vtkPolyData* mesh );
+
+      void SetScalarRange( double r[ 2 ] );
+      void SetWindowLevel( double wl[ 2 ] );
+      void SetImageOpacity( double o );
+      void SetImageInterpolation( unsigned char i );
+
+    protected:
+      MPR3DActors( );
+      virtual ~MPR3DActors( );
+
+    private:
+      // Purposely not implemented
+      MPR3DActors( const Self& );
+      Self& operator=( const Self& );
+
+    protected:
+      vtkSmartPointer< ImageSliceActors > m_Slices[ 3 ];
+      std::map< vtkSmartPointer< vtkPolyData >, TMeshActor > m_Meshes;
+    };
+
+  } // ecapseman
+
+} // ecapseman
+
+#endif // __cpExtensions__Visualization__MPR3DActors__h__
+
+// eof - $RCSfile$