13 #include <vtkOrientationMarkerWidget.h>
14 #include <vtkRenderer.h>
15 #include <vtkSmartPointer.h>
18 #include <cpPlugins/Interface/Interface.h>
19 #include <cpPlugins/Interface/ProcessObject.h>
20 #include <cpPlugins/Interface/Image.h>
21 #include <cpPlugins/Interface/DataObject.h>
22 #include <cpPlugins/Extensions/Visualization/MPRWithDifferentWindows.h>
24 // -------------------------------------------------------------------------
30 // -------------------------------------------------------------------------
40 typedef cpPlugins::Interface::Interface TPluginsInterface;
41 typedef cpPlugins::Interface::Object TPluginObject;
42 typedef cpPlugins::Interface::DataObject TPluginData;
43 typedef cpPlugins::Interface::Image TPluginImage;
44 typedef cpPlugins::Interface::ProcessObject TPlugin;
45 typedef TPlugin::TParameters TParameters;
46 typedef cpPlugins::Extensions::Visualization::MPRWithDifferentWindows TMPR;
48 typedef std::map< std::string, std::string > TStringMap;
51 explicit MainWnd( QWidget* parent = 0 );
55 void _LoadApplicationPreferences( );
57 bool _CheckClassesInPlugins( const TStringMap& classes );
58 void _AddPluginActions(
59 const TStringMap& classes, QMenu* menu, const char* method
61 TPluginImage* _LoadImage(
62 const std::string& image_type, const std::string& image_dim
64 void _UpdateEnabledFlags( );
66 bool _ParametersDialog( const TParameters& parameters );
72 void _SliceMesh( int axis );
73 static void _SliceEventCallback(
75 long unsigned int eventId,
76 void* clientData, void* callData
81 void _triggered_actionReloadPlugins( );
82 void _triggered_actionOpenInputImage( );
83 void _triggered_actionOpenSegmentedImage( );
84 void _triggered_actionSwitchMode( );
86 void _triggered_actionSegmentImage( );
87 void _triggered_actionFilterSegmentation( );
88 void _triggered_actionProcessMesh( );
91 void triggered_aOpenSegmentedImage( );
92 void triggered_aFilterSegmentedImage( );
93 void triggered_aSegmentedImageToMesh( );
94 void triggered_aLoadInputImage( );
95 void triggered_aLoadSegmentedImage( );
101 // Application preferences
102 std::string m_ApplicationPreferencesFile;
103 TStringMap m_ApplicationPreferences;
106 std::string m_PluginsConfigurationFile;
107 TPluginsInterface m_Plugins;
109 // Needed object from plugins
110 TStringMap m_BaseClasses;
111 TStringMap m_SegmentationClasses;
112 TStringMap m_SegmentationFilterClasses;
113 TStringMap m_MeshFilterClasses;
116 std::string m_LastOpenedFile;
119 TPluginImage* m_InputImage;
120 TPluginImage* m_SegmentedImage;
122 // Visualization stuff
126 TPlugin* m_ActivePlugin;
127 QWidget* m_ActiveParameters;
130 #endif // __MAINWND__H__