1 #ifndef __CPPLUGINS__INTERFACE__BASEMPRWINDOW__H__
2 #define __CPPLUGINS__INTERFACE__BASEMPRWINDOW__H__
4 #include <cpPlugins/Interface/cpPlugins_Interface_Export.h>
5 #include <cpPlugins/Interface/Config.h>
7 #ifdef cpPlugins_Interface_QT4
13 #include <QApplication>
15 #include <QVTKWidget.h>
17 #include <vtkSmartPointer.h>
19 #include <cpExtensions/QT/QuadSplitter.h>
20 #include <cpExtensions/Visualization/MPRObjects.h>
21 #include <cpPlugins/Interface/Interface.h>
22 #include <cpPlugins/Interface/ProcessObject.h>
23 #include <cpPlugins/Interface/Image.h>
24 #include <cpPlugins/Interface/Mesh.h>
32 class cpPlugins_Interface_EXPORT BaseMPRWindow
33 : public cpExtensions::QT::QuadSplitter
38 typedef cpPlugins::Interface::Interface TInterface;
39 typedef cpPlugins::Interface::ProcessObject TProcessObject;
40 typedef cpPlugins::Interface::DataObject TDataObject;
41 typedef cpPlugins::Interface::Image TImage;
42 typedef cpPlugins::Interface::Mesh TMesh;
44 typedef std::vector< TImage::Pointer > TImages;
45 typedef std::vector< TMesh::Pointer > TMeshes;
46 typedef std::set< std::string > TOrderedStringContainer;
47 typedef std::map< std::string, std::set< std::string > > TFilters;
50 explicit BaseMPRWindow( QWidget* parent = 0 );
51 virtual ~BaseMPRWindow( );
53 void DialogLoadPlugins( );
54 void AssociatePluginsToMenu(
55 QMenu* menu, QObject* obj, const char* slot
60 QApplication::setOverrideCursor( Qt::WaitCursor );
61 this->setEnabled( false );
63 inline void Unblock( )
65 QApplication::restoreOverrideCursor( );
66 this->setEnabled( true );
69 bool LoadPlugins( const std::string& fname );
75 const std::string& name,
76 int input_id, int output_id = -1
82 void _UpdatePlugins( );
85 typedef cpExtensions::Visualization::MPRObjects TMPRObjects;
86 vtkSmartPointer< TMPRObjects > m_MPRObjects;
93 TInterface m_Interface;
94 TOrderedStringContainer m_LoadedPlugins;
95 std::string m_LastLoadedPlugin;
97 TProcessObject::Pointer m_ImageReader;
98 TProcessObject::Pointer m_ImageWriter;
99 TProcessObject::Pointer m_MeshReader;
100 TProcessObject::Pointer m_MeshWriter;
111 #endif // cpPlugins_Interface_QT4
113 #endif // __CPPLUGINS__INTERFACE__BASEMPRWINDOW__H__