1 #ifndef __CPPLUGINS__INTERFACE__PLUGINS__H__
2 #define __CPPLUGINS__INTERFACE__PLUGINS__H__
4 #include <cpPlugins/Interface/cpPlugins_Interface_Export.h>
10 #include <cpPlugins/Interface/Interface.h>
11 #include <cpPlugins/Interface/ProcessObject.h>
12 #include <cpPlugins/Interface/Image.h>
13 #include <cpPlugins/Interface/Mesh.h>
25 class cpPlugins_Interface_EXPORT Plugins
28 typedef cpPlugins::Interface::Interface TInterface;
29 typedef cpPlugins::Interface::ProcessObject TProcessObject;
30 typedef cpPlugins::Interface::DataObject TDataObject;
31 typedef cpPlugins::Interface::Image TImage;
32 typedef cpPlugins::Interface::Mesh TMesh;
33 typedef TProcessObject::TParameters TParameters;
35 typedef std::set< std::string > TOrderedStringContainer;
36 typedef std::map< std::string, std::set< std::string > > TFilters;
39 Plugins( QWidget* widget = NULL );
42 QWidget* GetWidget( );
43 const QWidget* GetWidget( ) const;
44 void SetWidget( QWidget* widget );
46 void UnblockWidget( );
47 void DialogLoadPlugins( );
48 void AssociatePluginsToMenu(
49 QMenu* menu, QObject* obj, const char* slot
52 bool LoadPlugins( const std::string& fname );
53 bool LoadPluginsConfigurationFile( const std::string& fname );
55 TParameters* GetImageReaderParameters( );
56 TParameters* GetMeshReaderParameters( );
57 TParameters* GetImageWriterParameters( );
58 TParameters* GetMeshWriterParameters( );
60 const TParameters* GetImageReaderParameters( ) const;
61 const TParameters* GetMeshReaderParameters( ) const;
62 const TParameters* GetImageWriterParameters( ) const;
63 const TParameters* GetMeshWriterParameters( ) const;
66 bool ReadImage( TImage::Pointer& image, bool exec_qt = false );
67 bool ReadDicomSeries( TImage::Pointer& image );
68 bool ReadMesh( TMesh::Pointer& mesh, bool exec_qt = false );
70 bool WriteImage( TImage* image, bool exec_qt = false );
71 bool WriteMesh( TMesh* mesh, bool exec_qt = false );
75 TProcessObject::Pointer& filter, const std::string& name
84 TInterface m_Interface;
85 TOrderedStringContainer m_LoadedPlugins;
86 std::string m_LastLoadedPlugin;
88 TProcessObject::Pointer m_ImageReader;
89 TProcessObject::Pointer m_ImageWriter;
90 TProcessObject::Pointer m_MeshReader;
91 TProcessObject::Pointer m_MeshWriter;
92 TProcessObject::Pointer m_DicomSeriesReader;
100 #endif // __CPPLUGINS__INTERFACE__PLUGINS__H__