]> Creatis software - cpPlugins.git/blob - appli/ImageMPR/ImageMPR.h
b0ba3c4268480963dfd1de33c239fbd4e711ab4c
[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 <QDialog>
10 #include <QMainWindow>
11
12 // vtk stuff
13 #include <vtkSmartPointer.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 #include <cpExtensions/Visualization/MPRWithDifferentWindows.h>
21
22 // -------------------------------------------------------------------------
23 namespace Ui
24 {
25   class ImageMPR;
26 }
27
28 // -------------------------------------------------------------------------
29 /**
30  */
31 class ImageMPR
32   : public QMainWindow
33 {
34   Q_OBJECT;
35
36 public:
37   // Plugins types
38   typedef cpPlugins::Interface::Interface     TPluginsInterface;
39   typedef cpPlugins::Interface::Object        TPluginObject;
40   typedef cpPlugins::Interface::DataObject    TPluginData;
41   typedef cpPlugins::Interface::Image         TPluginImage;
42   typedef cpPlugins::Interface::Mesh          TPluginMesh;
43   typedef cpPlugins::Interface::ProcessObject TPluginFilter;
44   typedef cpPlugins::Interface::Parameters    TParameters;
45
46   typedef std::set< std::string > TStringContainer;
47   typedef cpExtensions::Visualization::MPRWithDifferentWindows TMPR;
48
49 public:
50   explicit ImageMPR( QWidget* parent = 0 );
51   virtual ~ImageMPR( );
52
53 protected:
54   bool _LoadPlugins( const std::string& filename );
55   bool _ParametersDialog( TPluginFilter* filter );
56
57 private slots:
58   void _triggered_actionOpenPlugins( );
59   void _triggered_actionOpenInputImage( );
60   void _triggered_actionOpenInputPolyData( );
61   void _triggered_actionImageToImage( );
62   void _triggered_actionImageToMesh( );
63
64 private:
65   Ui::ImageMPR* m_UI;
66
67   // Plugins objects
68   TPluginsInterface m_Plugins;
69
70   // Needed object from plugins
71   std::string m_ImageReaderClass;
72   std::string m_ImageWriterClass;
73   std::string m_MeshReaderClass;
74   std::string m_MeshWriterClass;
75   TStringContainer m_ImageToImageFilters;
76   TStringContainer m_ImageToMeshFilters;
77
78   // Real data
79   TPluginImage::Pointer m_InputImage;
80   TPluginMesh::Pointer  m_InputMesh;
81
82   // Visualization stuff
83   TMPR* m_MPR;
84   vtkSmartPointer< vtkPolyDataMapper > m_InputMeshMapper;
85   vtkSmartPointer< vtkActor >          m_InputMeshActor;
86
87   QDialog* m_ParametersDlg;
88
89   /* TODO
90      vtkSmartPointer< vtkOrientationMarkerWidget > m_3DOrientationWidget;
91   */
92 };
93
94 #endif // __IMAGEMPR__H__
95
96 // eof - $RCSfile$