SMILX  1.01
milxQtRegistration.h
1 #ifndef MILXQTRegistration_H
2 #define MILXQTRegistration_H
3 
4 #include "milxQtRegistrationParams.h"
5 #include "milxQtRegistration.h"
6 #include "milxQtRegistrationAlgos.h"
7 #include "milxQtMain.h"
8 #include <QObject>
9 #include <QFile>
10 
16 {
17 public:
18  double nmi;
19  double ssd;
20  double ncc;
21  double lncc;
22 };
23 
28 class milxQtRegistration : public QObject
29 {
30  Q_OBJECT
31 
32 public:
33 
38  milxQtRegistration(QObject * parent, milxQtImage * imageWindow, milxQtMain * mainW);
39 
44  milxQtRegistration(QObject * parent, QString, milxQtMain * mainW);
45 
51 
56  QString getPath();
57 
62  void setChecked(bool);
63 
68  void copyPath(char dest[FILENAME_MAX], QString src);
69 
74  bool isChecked();
75 
80  void setParams(milxQtRegistrationParams);
81 
86  void setRegType(RegType);
87 
92  void setReference(milxQtRegistration *);
93 
98  void setOutputFolder(QString);
99 
104  bool isOpened();
105 
110  int startRegistration();
111 
116  int createFiles();
117 
122  QString createFile(QString pathtemplate);
123 
128  void deleteTmpFiles();
129 
134  void copyAndReplace(QString src, QString dst);
135  void copyAndReplace(milxQtImage *src, QString dst);
136 
141  void setOpenResults(bool open);
142 
148  { return window; }
149 
154  QString getOutputPath();
155 
160  QString getOutputFolder();
161 
166  QString createAtlasFile();
167 
168 
173  QString createSimilarityFileAfter();
174 
179  QString createSimilarityFileBefore();
180 
181 
186  bool isWorkDone();
187 
192  QString getAlgoName();
193 
198  void setIsRef(bool);
199 
204  void setComputeSimilarities(bool);
205 
210  bool isRef();
211 
216  qint64 getDuration();
217 
218 
223  void reset();
224 
229 
230 signals:
231 
236  void done();
237 
242  void error(QString functionName, QString errorMsg);
243 
244 
245 public slots:
246 
251  void registrationCompleted();
252 
257  void algoError(QString functionName, QString errorMsg);
258 
259 #ifdef USE_NIFTI_REG
260 
264  void cpp2defCompleted();
265 
270  void similaritiesComputed();
271 #endif
272 
273 protected:
278  void init(QString);
279 
281  bool openedImage;
282  bool openResults;
283  QString path;
284  QString outputFolder;
285  bool checked;
286  bool workDone;
287  bool isRefImg;
288  RegType type;
291 
292  // Statistics
293  qint64 startTime;
294  qint64 stopTime;
295 
297 
298 };
299 
300 #endif // MILXQTRegistration_H
301 
milxQtImage * window
MilxQt window of the image, if the image is already opened in SMILI.
Contain all the values of similarity measurement.
Contain all the informations and functions required to register an image.
bool openedImage
Is the image already opened in SMILI.
This class represents the MILX Qt Image Display object using VTK.
Definition: milxQtImage.h:118
bool workDone
Is the registration done.
bool openResults
Do we have to open the results after the registration.
milxQtMain * MainWindow
Main window of SMILI.
RegType type
Type of the registration.
double ncc
Normalized Cross Correlation.
milxQtSimilarities similarities_after
Similarities after the registration.
bool isRefImg
Is this image the reference image.
bool checked
Is the image checked: do we need to perform a registration.
double ssd
Sum Squared Difference.
QString path
Path of the image.
bool computeSimilarities
Do we have to compute similarities.
milxQtRegistrationParams params
Parameters for registration.
qint64 startTime
Time start of the registration.
milxQtRegistration * reference
Reference image for the registration.
milxQtImage * getImage()
Return the image object for registration.
double nmi
Normalize mutual information.
milxQtSimilarities similarities_before
Similarities before the registration.
double lncc
Localy Normalized Cross Correlation.
qint64 stopTime
Time the registration ended.
milxQtRegistrationAlgos * regAlgos
Class containing the algorithms for the registration.
This class represents the MILX Qt Main Window object using Qt.
Definition: milxQtMain.h:85
QString outputFolder
Path of the output folder.