SMILX  1.01
milxQtRegistrationPlugin.h
1 #ifndef MILXQTRegistrationPLUGIN_H
2 #define MILXQTRegistrationPLUGIN_H
3 
4 #include <QThread>
5 #include <QMenu>
6 #include <QDockWidget>
7 //VTK
8 #include <vtkPolyDataCollection.h>
9 
10 #include "milxQtAliases.h"
11 #include "milxQtPluginInterface.h"
12 #include "milxQtRenderWindow.h"
13 #include "milxQtImage.h"
14 #include "milxQtModel.h"
15 #include "milxQtMain.h"
16 #include "milxQtRegistrationWindow.h"
17 
18 
27 {
28  Q_OBJECT
29 
30 public:
35  milxQtRegistrationPlugin(QObject *theParent = 0);
36  virtual ~milxQtRegistrationPlugin();
37 
42  virtual QString name();
43 
48  inline virtual bool hasOpenSupport()
49  {
50  return false;
51  }
56  virtual QString openFileSupport();
61  virtual QStringList openExtensions();
66  inline virtual bool hasSaveSupport()
67  {
68  return false;
69  }
74  virtual QString saveFileSupport();
79  virtual QStringList saveExtensions();
80 
85  inline virtual bool hasCollectionSupport()
86  {
87  return false;
88  }
93  virtual void SetInputCollection(vtkPolyDataCollection* collection, QStringList &filenames);
94 
99  virtual void open(QString filename);
104  virtual void save(QString filename);
105 
115  virtual milxQtModel* modelResult();
120  virtual milxQtImage* imageResult();
125  virtual QDockWidget* dockWidget();
126 
131  inline virtual Qt::DockWidgetArea dockDefaultArea()
132  {
133  return Qt::LeftDockWidgetArea;
134  }
135 
140  virtual bool isPluginWindow(QWidget *window);
141 
146  void registration(RegType type);
147 
148 public slots:
153  virtual void loadExtension();
161  virtual void update() {}
166  virtual void preStartTasks() {}
171  virtual void postStartTasks() {}
172 
177  void ItkAffineRegistrationSlot();
178 
183  void ItkDemonRegistrationSlot();
184 
185 #ifdef USE_NIFTI_REG
186 
190  void F3DNiftiRegistrationSlot();
191 
196  void AladinNiftiRegistrationSlot();
197 #endif
198 
199 #ifdef USE_ELASTIX
200 
204  void ElastixAffineRegistrationSlot();
205 
210  void ElastixBSplineRegistrationSlot();
211 #endif
212 
213 protected:
214 
215  QPointer<milxQtMain> MainWindow;
216 
217  QMenu* menu;
218  QAction* actionItkAffine;
219  QAction* actionItkDemon;
220 
221 #ifdef USE_NIFTI_REG
222  QAction* actionF3DNifti;
223  QAction* actionAladinNifti;
224 #endif
225 
226 #ifdef USE_ELASTIX
227  QAction* actionElastixAffine;
228  QAction* actionElastixBSpline;
229 #endif
230 
231  QPointer<milxQtRegistrationWindow> regWindow;
232 
233  void createActions();
234  void createMenu();
235  void createConnections();
236 
237 };
238 
240 {
241  Q_OBJECT
242  Q_INTERFACES(milxQtPluginFactory)
243 
244 public:
245  milxQtPluginInterface* newPlugin(QObject *theParent = 0)
246  {
247  return new milxQtRegistrationPlugin(theParent);
248  }
249 };
250 
251 #endif // MILXQTRegistrationPLUGIN_H
QPointer< milxQtRegistrationWindow > regWindow
registration window
QAction * actionItkAffine
Itk Affine action.
virtual QDockWidget * dockWidget()=0
Return the dock widget (if one is provided by plugin). [Implement this in your plugin].
virtual QString saveFileSupport()=0
Get the file support string for saving (extension wildcard list). [Implement this in your plugin]...
virtual milxQtImage * imageResult()=0
Get the image result. The result can then be displayed in milxQtMain etc.[Implement this in your plug...
This file defines all the defines, aliases and frequently used functions and variables.
This class represents the MILX Qt Render Window Display object using QVTK.
virtual QStringList saveExtensions()=0
Get a list of supported file format extensions. [Implement this in your plugin].
This class represents the MILX Qt Image Display object using VTK.
Definition: milxQtImage.h:118
virtual QStringList openExtensions()=0
Get a list of supported file format extensions. [Implement this in your plugin].
QMenu * menu
Registration menu.
virtual void postStartTasks()
Tasks to complete after running or starting the thread. [Implement this].
virtual void loadExtension()=0
Load the extension. [Implement this in your plugin].
virtual void preStartTasks()
Tasks to complete before running or starting the thread. [Implement this].
QAction * actionItkDemon
Itk Demon action.
The interface for the Registration plugin for milxQt.
virtual QString name()=0
Get the Name of the plugin. [Implement this in your plugin].
This class represents the MILX Qt Model/Mesh Display object using VTK.
Definition: milxQtModel.h:115
virtual bool hasSaveSupport()
Does the plugin support opening files? [Implement this in your plugin].
virtual void SetInputCollection(vtkPolyDataCollection *collection, QStringList &filenames)=0
Pass a collection to internal plugin class. [Implement this in your plugin].
virtual Qt::DockWidgetArea dockDefaultArea()
Return the default dock widget area (if one is provided by plugin). [Implement this in your plugin]...
virtual bool hasCollectionSupport()
Does the plugin support collections (PolyData collection etc.). [Implement this in your plugin]...
virtual void update()
Update the plugin. [Implement this in your plugin].
The interface for any plugins that can be made for milxQtMain.
virtual bool isPluginWindow(QWidget *window)=0
Is the window provided a plugin generated window? In this case a milxQtShapeModel window...
virtual milxQtModel * modelResult()=0
Get the model result. The result can then be displayed in milxQtMain etc. [Implement this in your plu...
virtual milxQtRenderWindow * genericResult()=0
Get the generic result, which is a milxQtRenderWindow. The result can then be displayed in milxQtMain...
virtual QString openFileSupport()=0
Get the file support string for opening (extension wildcard list). [Implement this in your plugin]...
virtual void open(QString filename)=0
Open the file using the plugin. [Implement this in your plugin].
#define MILXQT_PLUGIN_EXPORT
Define Windows Plugin DLL importing.
virtual bool hasOpenSupport()
Does the plugin support opening files? [Implement this in your plugin].
virtual void save(QString filename)=0
Save the result as a file using the plugin. [Implement this in your plugin].