]> Creatis software - cpPlugins.git/blob - appli/ImageMPR/ImageMPR.h
Plugin system is now instalable. Dependency to boost eliminated.
[cpPlugins.git] / appli / ImageMPR / ImageMPR.h
1 #ifndef __IMAGEMPR__H__
2 #define __IMAGEMPR__H__
3
4 #include <vector>
5
6 // Qt stuff
7 #include <QMainWindow>
8
9 // vtk stuff
10 #include <vtkSmartPointer.h>
11 #include <cpExtensions/Visualization/MPRObjects.h>
12
13 // Plugins interface
14 #include <cpPlugins/Interface/Interface.h>
15 #include <cpPlugins/Interface/ProcessObject.h>
16 #include <cpPlugins/Interface/Image.h>
17 #include <cpPlugins/Interface/Mesh.h>
18
19 // -------------------------------------------------------------------------
20 namespace Ui
21 {
22   class ImageMPR;
23 }
24
25 // -------------------------------------------------------------------------
26 /**
27  */
28 class ImageMPR
29   : public QMainWindow
30 {
31   Q_OBJECT;
32
33 public:
34   // Plugins types
35   typedef cpPlugins::Interface::Interface     TPluginsInterface;
36   typedef cpPlugins::Interface::Object        TPluginObject;
37   typedef cpPlugins::Interface::DataObject    TPluginData;
38   typedef cpPlugins::Interface::Image         TPluginImage;
39   typedef cpPlugins::Interface::Mesh          TPluginMesh;
40   typedef cpPlugins::Interface::ProcessObject TPluginFilter;
41   typedef cpPlugins::Interface::Parameters    TParameters;
42
43   typedef cpExtensions::Visualization::MPRObjects TMPRObjects;
44
45 public:
46   explicit ImageMPR( QWidget* parent = 0 );
47   virtual ~ImageMPR( );
48
49 protected:
50   bool _LoadPlugins( const std::string& filename );
51   std::string _LoadImage(
52     TPluginImage::Pointer& image, const QStringList& names
53     );
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
75   // Real data
76   TPluginImage::Pointer m_InputImage;
77   TPluginImage::Pointer m_InputSegmentation;
78   TPluginMesh::Pointer  m_InputMesh;
79
80   // Visualization stuff
81   vtkSmartPointer< TMPRObjects > m_MPRObjects;
82
83   /* TODO
84      vtkSmartPointer< vtkOrientationMarkerWidget > m_3DOrientationWidget;
85   */
86 };
87
88 #endif // __IMAGEMPR__H__
89
90 // eof - $RCSfile$