]> Creatis software - cpPlugins.git/blob - appli/ImageMPR/ImageMPR.h
MPR almost working with multiple images
[cpPlugins.git] / appli / ImageMPR / ImageMPR.h
1 #ifndef __IMAGEMPR__H__
2 #define __IMAGEMPR__H__
3
4 // Standard stuff
5 #include <map>
6 #include <set>
7
8 // Qt stuff
9 #include <QMainWindow>
10
11 // vtk stuff
12 #include <vtkSmartPointer.h>
13 #include <cpExtensions/Visualization/MPRObjects.h>
14
15 // Plugins interface
16 #include <cpPlugins/Interface/Interface.h>
17 #include <cpPlugins/Interface/ProcessObject.h>
18 #include <cpPlugins/Interface/Image.h>
19 #include <cpPlugins/Interface/Mesh.h>
20
21 // -------------------------------------------------------------------------
22 namespace Ui
23 {
24   class ImageMPR;
25 }
26
27 // -------------------------------------------------------------------------
28 /**
29  */
30 class ImageMPR
31   : public QMainWindow
32 {
33   Q_OBJECT;
34
35 public:
36   // Plugins types
37   typedef cpPlugins::Interface::Interface     TPluginsInterface;
38   typedef cpPlugins::Interface::Object        TPluginObject;
39   typedef cpPlugins::Interface::DataObject    TPluginData;
40   typedef cpPlugins::Interface::Image         TPluginImage;
41   typedef cpPlugins::Interface::Mesh          TPluginMesh;
42   typedef cpPlugins::Interface::ProcessObject TPluginFilter;
43   typedef cpPlugins::Interface::Parameters    TParameters;
44
45   typedef std::set< std::string > TStringContainer;
46   typedef cpExtensions::Visualization::MPRObjects TMPRObjects;
47
48 public:
49   explicit ImageMPR( QWidget* parent = 0 );
50   virtual ~ImageMPR( );
51
52 protected:
53   bool _LoadPlugins( const std::string& filename );
54
55 private slots:
56   void _triggered_actionOpenPlugins( );
57   void _triggered_actionOpenInputImage( );
58   void _triggered_actionOpenSegmentation( );
59   void _triggered_actionOpenInputPolyData( );
60   void _triggered_actionImageToImage( );
61   void _triggered_actionImageToMesh( );
62
63 private:
64   Ui::ImageMPR* m_UI;
65
66   // Plugins objects
67   TPluginsInterface m_Plugins;
68
69   // Needed object from plugins
70   std::string m_ImageReaderClass;
71   std::string m_ImageWriterClass;
72   std::string m_MeshReaderClass;
73   std::string m_MeshWriterClass;
74   TStringContainer m_ImageToImageFilters;
75   TStringContainer m_ImageToMeshFilters;
76
77   // Real data
78   TPluginImage::Pointer m_InputImage;
79   TPluginImage::Pointer m_InputSegmentation;
80   TPluginMesh::Pointer  m_InputMesh;
81
82   // Visualization stuff
83   vtkSmartPointer< TMPRObjects > m_MPRObjects;
84
85   /* TODO
86      vtkSmartPointer< vtkOrientationMarkerWidget > m_3DOrientationWidget;
87   */
88 };
89
90 #endif // __IMAGEMPR__H__
91
92 // eof - $RCSfile$