]> Creatis software - cpPlugins.git/blobdiff - lib/cpExtensions/QT/MPR3DWidget.h
yet another refactoring
[cpPlugins.git] / lib / cpExtensions / QT / MPR3DWidget.h
diff --git a/lib/cpExtensions/QT/MPR3DWidget.h b/lib/cpExtensions/QT/MPR3DWidget.h
new file mode 100644 (file)
index 0000000..6a0ef6e
--- /dev/null
@@ -0,0 +1,64 @@
+#ifndef __cpExtensions__QT__MPR3DWidget__h__
+#define __cpExtensions__QT__MPR3DWidget__h__
+
+#include <cpExtensions/QT/RendererWidget.h>
+
+// -------------------------------------------------------------------------
+class vtkDataSet;
+
+// -------------------------------------------------------------------------
+namespace cpExtensions
+{
+  namespace Visualization
+  {
+    class ImageOutlineActor;
+    class MeshActor;
+    class WindowLevelImageActor;
+  }
+
+  namespace QT
+  {
+    /**
+     */
+    class cpExtensions_EXPORT MPR3DWidget
+      : public cpExtensions::QT::RendererWidget
+    {
+      Q_OBJECT;
+
+    public:
+      typedef MPR3DWidget                      Self;
+      typedef cpExtensions::QT::RendererWidget Superclass;
+
+      typedef cpExtensions::Visualization::MeshActor             TActor;
+      typedef cpExtensions::Visualization::ImageOutlineActor     TOLActor;
+      typedef cpExtensions::Visualization::WindowLevelImageActor TWLActor;
+
+    public:
+      explicit MPR3DWidget( QWidget* parent = NULL, Qt::WindowFlags f = 0 );
+      virtual ~MPR3DWidget( );
+
+      void Clear( );
+      void SetImage( vtkImageData* image, const std::string& name );
+      void Add( vtkDataSet* data, const std::string& name );
+
+      TWLActor* GetImageActor( int o );
+      const TWLActor* GetImageActor( int o ) const;
+
+      void SetSliceNumber( int orientation, int slice );
+      void SetSlicesNumbers( int x, int y, int z );
+
+    protected:
+      std::string m_ImageName;
+
+      vtkSmartPointer< TWLActor > m_WLActors[ 3 ];
+      vtkSmartPointer< TOLActor > m_OLActors[ 3 ];
+      std::vector< TActor* > m_Actors;
+    };
+
+  } // ecapseman
+
+} // ecapseman
+
+#endif // __cpExtensions__QT__MPR3DWidget__h__
+
+// eof - $RCSfile$