]> Creatis software - cpPlugins.git/blob - appli/ImageMPR/ImageMPR.h
Major refactoring: API-HCI bug corrected.
[cpPlugins.git] / appli / ImageMPR / ImageMPR.h
1 #ifndef __IMAGEMPR__H__
2 #define __IMAGEMPR__H__
3
4 // Standard stuff
5 #include <map>
6 #include <string>
7
8 // Qt stuff
9 #include <QMainWindow>
10
11 // vtk stuff
12 #include <vtkSmartPointer.h>
13
14 // Plugins interface
15 #include <cpPlugins/Interface/Interface.h>
16 #include <cpPlugins/Interface/ProcessObject.h>
17 #include <cpPlugins/Interface/Image.h>
18 #include <cpPlugins/Interface/Mesh.h>
19 #include <cpPlugins/Extensions/Visualization/MPRWithDifferentWindows.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::map< std::string, std::string > TStringMap;
46   typedef cpPlugins::Extensions::Visualization::MPRWithDifferentWindows TMPR;
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_actionOpenInputPolyData( );
59
60 private:
61   Ui::ImageMPR* m_UI;
62
63   // Plugins objects
64   TPluginsInterface m_Plugins;
65
66   // Needed object from plugins
67   TStringMap m_BaseClasses;
68
69   // Real data
70   TPluginImage::Pointer m_InputImage;
71   TPluginMesh::Pointer  m_InputMesh;
72
73   // Visualization stuff
74   TMPR* m_MPR;
75   vtkSmartPointer< vtkPolyDataMapper > m_InputMeshMapper;
76   vtkSmartPointer< vtkActor >          m_InputMeshActor;
77
78   /* TODO
79      vtkSmartPointer< vtkOrientationMarkerWidget > m_3DOrientationWidget;
80   */
81 };
82
83 #endif // __IMAGEMPR__H__
84
85 // eof - $RCSfile$