SMILX  1.01
milxQtRegistrationWindow.h
1 #ifndef MILXQTRegistrationWindow_H
2 #define MILXQTRegistrationWindow_H
3 
4 #include "ui_registrationWindow.h"
5 #include "milxQtRegistrationAdvancedOptions.h"
6 #include "milxQtMain.h"
7 #include "milxQtImage.h"
8 #include "milxQtFile.h"
9 #include "milxQtRegistrationAlgos.h"
10 #include "milxQtRegistration.h"
11 
12 typedef QList<milxQtImage *> QImageList;
13 
18 class milxQtRegistrationWindow : public QDialog
19 {
20  Q_OBJECT
21 
22 public:
27  milxQtRegistrationWindow(QWidget * theParent);
28 
33  virtual ~milxQtRegistrationWindow();
34 
39  void initUI();
40 
45  void setAlgo(RegType regType);
46 
51  void updateImageListCombo();
52 
57  void updateOpenImages();
58 
63  bool isImageInList(QString path);
64 
69  RegType getCurrentAlgo();
70 
75  void updateParameters();
76 
82 
88 
94 
100 
106 
112 
118 
123  void disableUI();
124 
129  void enableUI();
130 
135  void performRegistrations();
136 
141  void workCompleted();
142 
147  QString getDefaultOutputFolder();
148 
149 
150 
151 #ifdef USE_NIFTI_REG
152  /*
153  \fn milxQtRegistrationWindow::writeSimilarities()
154  \brief Write the similarities file
155  */
156  void writeSimilarities();
157 
162  void computeAtlas();
163 #endif
164 
165  QList<milxQtRegistration *> images;
166 
167 public slots:
172  void accept();
173 
178  void reject();
179 
184  void referenceComboChange(int newIndex);
185 
190  void algoComboChange(int newIndex);
191 
196  void advancedOptionsClicked();
197 
202  void addImageClicked();
203 
208  void selectAllClicked();
209 
214  void unselectAllClicked();
215 
220  void browseBtnClicked();
221 
226  void regComplete();
227 
232  void regError(QString functionName, QString errorMsg);
233 
238  void clearList();
239 
244  void averageComputed();
245 
246 protected:
251  void createConnections();
252 
253  Ui::dlgRegistrationWindow ui;
259  QString atlasPath;
260  bool openResults;
261 };
262 
263 #endif // MILXQTRegistrationWindow_H
void updateOpenImages()
Update the list of open images in SMILI.
Contain all the informations and functions required to register an image.
bool computeAverage
Do we need to compute the average of the registrations.
QString getDefaultOutputFolder()
Return the default output folder.
void enableUI()
Enable the user interface.
void regError(QString functionName, QString errorMsg)
An error happened during the registration or average function.
milxQtRegistrationParams getParamsDemonItk()
Return the parameters for a Itk Demon registration.
bool workInProgress
Is there any work in progress.
bool isImageInList(QString path)
Is the image already listed in our list of images.
milxQtRegistrationParams getParamsAladinNifti()
Return the parameters for an Nifti Aladin registration.
milxQtRegistrationAlgos * regAlgos
reg algorithm to compute average
void workCompleted()
Everything has been completed.
void updateImageListCombo()
Update the list of images in the combo box.
milxQtRegistrationAdvancedOptions * advancedOptionsWindow
Advanced options window.
void updateParameters()
Update images parameters, set the values of the form to images.
RegType getCurrentAlgo()
Return the current algorithm selected in the combo box.
virtual ~milxQtRegistrationWindow()
The standard destructor.
milxQtRegistrationParams getParamsElastixBSpline()
Return the parameters for a Elastix BSpline registration.
void performRegistrations()
Perform the next registration.
This class is the advanced options form for the registration.
milxQtRegistrationWindow(QWidget *theParent)
The standard constructor.
milxQtRegistrationParams getParamsF3DNifti()
Return the parameters for a Nifti F3D registration.
void setAlgo(RegType regType)
Set the type of algorithm and change the form accordingly (display the correct fields) ...
This class is the registration window/form.
milxQtRegistrationParams getParamsElastixAffine()
Return the parameters for a Elastix Affine registration.
milxQtMain * MainWindow
Main window of SMILIX.
void disableUI()
Disable the user interface.
void addImage(milxQtRegistration *)
Add an image to our list of images.
QString atlasPath
Path to the outputed atlas.
This class represents the MILX Qt Main Window object using Qt.
Definition: milxQtMain.h:85
QList< milxQtRegistration * > images
List of images for the combobox and list of selectable images.
milxQtRegistrationParams getParamsAffineItk()
Return the parameters for a Itk Affine registration.
Ui::dlgRegistrationWindow ui
User interface.
bool openResults
Store if we need to open the results.
void initUI()
The standard constructor.