]> Creatis software - cpPlugins.git/blobdiff - appli/ImageMPR/ImageMPR.h
Intermediary commit
[cpPlugins.git] / appli / ImageMPR / ImageMPR.h
index 808c0ab012407e6b11a681e46b2cd0c9428de39c..82e2e197f313d5a2509e27668121706c89ff511d 100644 (file)
@@ -1,22 +1,20 @@
 #ifndef __IMAGEMPR__H__
 #define __IMAGEMPR__H__
 
-// Standard stuff
-#include <map>
-#include <set>
+#include <vector>
 
 // Qt stuff
 #include <QMainWindow>
 
 // vtk stuff
-#include <vtkRenderer.h>
 #include <vtkSmartPointer.h>
-#include <cpExtensions/Visualization/MPRActors.h>
+#include <cpExtensions/Visualization/MPRObjects.h>
 
 // Plugins interface
 #include <cpPlugins/Interface/Interface.h>
 #include <cpPlugins/Interface/ProcessObject.h>
 #include <cpPlugins/Interface/Image.h>
+#include <cpPlugins/Interface/ImplicitFunction.h>
 #include <cpPlugins/Interface/Mesh.h>
 
 // -------------------------------------------------------------------------
@@ -35,16 +33,16 @@ class ImageMPR
 
 public:
   // Plugins types
-  typedef cpPlugins::Interface::Interface     TPluginsInterface;
-  typedef cpPlugins::Interface::Object        TPluginObject;
-  typedef cpPlugins::Interface::DataObject    TPluginData;
-  typedef cpPlugins::Interface::Image         TPluginImage;
-  typedef cpPlugins::Interface::Mesh          TPluginMesh;
-  typedef cpPlugins::Interface::ProcessObject TPluginFilter;
-  typedef cpPlugins::Interface::Parameters    TParameters;
+  typedef cpPlugins::Interface::Interface        TPluginsInterface;
+  typedef cpPlugins::Interface::Object           TPluginObject;
+  typedef cpPlugins::Interface::DataObject       TPluginData;
+  typedef cpPlugins::Interface::Image            TPluginImage;
+  typedef cpPlugins::Interface::ImplicitFunction TPluginImplicitFunction;
+  typedef cpPlugins::Interface::Mesh             TPluginMesh;
+  typedef cpPlugins::Interface::ProcessObject    TPluginFilter;
+  typedef cpPlugins::Interface::Parameters       TParameters;
 
-  typedef std::set< std::string > TStringContainer;
-  typedef cpExtensions::Visualization::MPRActors TMPRActors;
+  typedef cpExtensions::Visualization::MPRObjects TMPRObjects;
 
 public:
   explicit ImageMPR( QWidget* parent = 0 );
@@ -52,10 +50,13 @@ public:
 
 protected:
   bool _LoadPlugins( const std::string& filename );
+  std::string _LoadImage( TPluginImage::Pointer& image );
+  std::string _ConfigureMeshActors( );
 
 private slots:
   void _triggered_actionOpenPlugins( );
   void _triggered_actionOpenInputImage( );
+  void _triggered_actionOpenSegmentation( );
   void _triggered_actionOpenInputPolyData( );
   void _triggered_actionImageToImage( );
   void _triggered_actionImageToMesh( );
@@ -71,18 +72,19 @@ private:
   std::string m_ImageWriterClass;
   std::string m_MeshReaderClass;
   std::string m_MeshWriterClass;
-  TStringContainer m_ImageToImageFilters;
-  TStringContainer m_ImageToMeshFilters;
+  std::string m_MeshCutterClass;
 
   // Real data
-  TPluginImage::Pointer m_InputImage;
-  TPluginMesh::Pointer  m_InputMesh;
+  TPluginImage::Pointer m_Image;
+  TPluginImage::Pointer m_Segmentation;
+  TPluginMesh::Pointer  m_Mesh;
+
+  // Cutters
+  TPluginFilter::Pointer m_Cutters[ 3 ];
+  TPluginImplicitFunction::Pointer m_Planes[ 3 ];
 
   // Visualization stuff
-  vtkSmartPointer< TMPRActors >        m_MPRActors;
-  vtkSmartPointer< vtkRenderer >       m_Renderers[ 4 ];
-  vtkSmartPointer< vtkPolyDataMapper > m_InputMeshMapper;
-  vtkSmartPointer< vtkActor >          m_InputMeshActor;
+  vtkSmartPointer< TMPRObjects > m_MPRObjects;
 
   /* TODO
      vtkSmartPointer< vtkOrientationMarkerWidget > m_3DOrientationWidget;