SMILX  1.01
milxQtRegistrationAlgos.h
1 /*=========================================================================
2  The Software is copyright (c) Commonwealth Scientific and Industrial Research Organisation (CSIRO)
3  ABN 41 687 119 230.
4  All rights reserved.
5 
6  Licensed under the CSIRO BSD 3-Clause License
7  You may not use this file except in compliance with the License.
8  You may obtain a copy of the License in the file LICENSE.md or at
9 
10  https://stash.csiro.au/projects/SMILI/repos/smili/browse/license.txt
11 
12  Unless required by applicable law or agreed to in writing, software
13  distributed under the License is distributed on an "AS IS" BASIS,
14  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  See the License for the specific language governing permissions and
16  limitations under the License.
17 =========================================================================*/
18 #ifndef milxQtRegistrationAlgosAlgos_H
19 #define milxQtRegistrationAlgosAlgos_H
20 #include "milxQtMain.h"
21 #include <QObject>
22 #include <QtCore>
23 #include <QFuture>
24 #include "milxQtRegistrationParams.h"
25 #include "milxRegistration.h"
26 
27 class milxQtRegistration;
28 
29 #ifdef USE_NIFTI_REG
30 #include "_reg_ReadWriteImage.h"
31 #include "_reg_f3d2.h"
32 #include "_reg_ReadWriteImage.h"
33 #include "_reg_resampling.h"
34 #include "_reg_globalTransformation.h"
35 #include "_reg_localTransformation.h"
36 #include "_reg_tools.h"
37 #include "_reg_thinPlateSpline.h"
38 #include "_reg_aladin.h"
39 #include "_reg_aladin_sym.h"
40 #include <fstream>
41 #include <vector>
42 #include <iostream>
43 
44 #ifdef _USE_NR_DOUBLE
45 #define PrecisionTYPE double
46 #else
47 #define PrecisionTYPE float
48 #endif
49 
50 #ifdef _USE_CUDA
51 #include "_reg_f3d_gpu.h"
52 #endif
53 #include "float.h"
54 #include <limits>
55 
56 #ifdef _WINDOWS
57 #include <time.h>
58 #endif
59 #endif
60 
61 #ifdef USE_ELASTIX
62 #include "itkUseMevisDicomTiff.h"
63 #include "elxElastixMain.h"
64 #include <iostream>
65 #include <string>
66 #include <vector>
67 #include <queue>
68 #include "itkObject.h"
69 #include "itkDataObject.h"
70 #include <itksys/SystemTools.hxx>
71 #include <itksys/SystemInformation.hxx>
72 #include "elxTimer.h"
73 #endif
74 
79 class milxQtRegistrationAlgos : public QObject
80 {
81  Q_OBJECT
82 
83 public:
88  milxQtRegistrationAlgos(QObject * parent);
89 
94  int affine(milxQtRegistrationParams params);
95 
100  int demon(milxQtRegistrationParams params);
101 
102 
108 
114 
115 #ifdef USE_NIFTI_REG
116 
120  int cpp2def(milxQtRegistrationParams params);
121 
126  int f3d(milxQtRegistrationParams params);
127 
132  int aladin(milxQtRegistrationParams params);
133 
138  int average(QString outputName, QStringList filenames);
139 
144  int similarities(milxQtRegistration * image);
145 
150  void cpp2def_async(milxQtRegistrationParams params);
151 
156  void f3d_async(milxQtRegistrationParams params);
157 
162  void aladin_async(milxQtRegistrationParams params);
163 
168  void average_async(QString outputName, QStringList filenames);
169 
174  void similarities_async(milxQtRegistration * image);
175 #endif
176 
177 
178 #ifdef USE_ELASTIX
179 
183  int elastix(milxQtRegistrationParams params);
184 
189  void elastix_async(milxQtRegistrationParams params);
190 
195  void elastixClean(milxQtRegistrationParams params);
196 #endif
197 
198 signals:
203  void registrationCompleted();
204 
209  void error(QString functionName, QString errorMsg);
210 
211 #ifdef USE_NIFTI_REG
212 
216  void cpp2defCompleted();
217 
222  void averageCompleted();
223 
228  void similaritiesComputed();
229 
230 #endif
231 
232 protected:
233  QFuture<int> future;
234 };
235 
236 
237 #endif // MILXQTRegistrationPLUGIN_H
QFuture< int > future
Used to start the functions asynchroniously.
Contain all the informations and functions required to register an image.
void affine_async(milxQtRegistrationParams params)
Perform a ITK affine registration asynchroniously.
milxQtRegistrationAlgos(QObject *parent)
The standard constructor.
void error(QString functionName, QString errorMsg)
An error happened during the registration.
void registrationCompleted()
The registration has been completed.
int demon(milxQtRegistrationParams params)
Perform a ITK demon registration.
int affine(milxQtRegistrationParams params)
Perform a ITK affine registration.
void demon_async(milxQtRegistrationParams params)
Perform a ITK demon registration asynchroniously.