]> Creatis software - creaCLI.git/blob - ModuleCall/GenSrc/bbSlicerGeneralRegistrationBRAINS.h
All Slicer modules succesfully compiled into BBTK boxes :P
[creaCLI.git] / ModuleCall / GenSrc / bbSlicerGeneralRegistrationBRAINS.h
1 #ifndef __bbSlicerGeneralRegistrationBRAINS_h_INCLUDED__
2 #define __bbSlicerGeneralRegistrationBRAINS_h_INCLUDED__
3
4 #include "bbSlicer_EXPORT.h"
5 #include "bbtkAtomicBlackBox.h"
6
7 #include <vector>
8 #include <cstdlib>
9 #include <dlfcn.h>
10 #include <sstream>
11 #include <fstream>
12 #include <iostream>
13
14 #include <ModuleDescriptionUtilities.h>
15 #include <ModuleDescriptionParser.h>
16 #include <ModuleParameterGroup.h>
17 #include <ModuleDescription.h>
18 #include <ModuleParameter.h>
19
20 #include "CreationTool.h"
21
22 namespace bbSlicer {
23
24     class bbSlicer_EXPORT GeneralRegistrationBRAINS
25     :
26     public bbtk::AtomicBlackBox {
27         BBTK_BLACK_BOX_INTERFACE ( GeneralRegistrationBRAINS , bbtk::AtomicBlackBox ) ;
28
29         // GENERATED ARGS        
30         
31 BBTK_DECLARE_INPUT ( fixedVolume , std::string );
32 BBTK_DECLARE_INPUT ( movingVolume , std::string );
33 BBTK_DECLARE_INPUT ( bsplineTransform , std::string );
34 BBTK_DECLARE_INPUT ( linearTransform , std::string );
35 BBTK_DECLARE_INPUT ( outputVolume , std::string );
36 BBTK_DECLARE_INPUT ( initialTransform , std::string );
37 BBTK_DECLARE_INPUT ( initializeTransformMode , std::string );
38 BBTK_DECLARE_INPUT ( useRigid , bool );
39 BBTK_DECLARE_INPUT ( useScaleVersor3D , bool );
40 BBTK_DECLARE_INPUT ( useScaleSkewVersor3D , bool );
41 BBTK_DECLARE_INPUT ( useAffine , bool );
42 BBTK_DECLARE_INPUT ( useBSpline , bool );
43 BBTK_DECLARE_INPUT ( numberOfSamples , int );
44 BBTK_DECLARE_INPUT ( splineGridSize , std::vector<int> );
45 BBTK_DECLARE_INPUT ( numberOfIterations , std::vector<int> );
46 BBTK_DECLARE_INPUT ( maskProcessingMode , std::string );
47 BBTK_DECLARE_INPUT ( fixedBinaryVolume , std::string );
48 BBTK_DECLARE_INPUT ( movingBinaryVolume , std::string );
49 BBTK_DECLARE_INPUT ( outputFixedVolumeROI , std::string );
50 BBTK_DECLARE_INPUT ( outputMovingVolumeROI , std::string );
51 BBTK_DECLARE_INPUT ( outputVolumePixelType , std::string );
52 BBTK_DECLARE_INPUT ( backgroundFillValue , double );
53 BBTK_DECLARE_INPUT ( maskInferiorCutOffFromCenter , double );
54 BBTK_DECLARE_INPUT ( scaleOutputValues , bool );
55 BBTK_DECLARE_INPUT ( interpolationMode , std::string );
56 BBTK_DECLARE_INPUT ( minimumStepLength , std::vector<double> );
57 BBTK_DECLARE_INPUT ( translationScale , double );
58 BBTK_DECLARE_INPUT ( reproportionScale , double );
59 BBTK_DECLARE_INPUT ( skewScale , double );
60 BBTK_DECLARE_INPUT ( maxBSplineDisplacement , double );
61 BBTK_DECLARE_INPUT ( histogramMatch , bool );
62 BBTK_DECLARE_INPUT ( numberOfHistogramBins , int );
63 BBTK_DECLARE_INPUT ( numberOfMatchPoints , int );
64 BBTK_DECLARE_INPUT ( strippedOutputTransform , std::string );
65 BBTK_DECLARE_INPUT ( transformType , std::vector<std::string> );
66 BBTK_DECLARE_INPUT ( outputTransform , std::string );
67 BBTK_DECLARE_INPUT ( fixedVolumeTimeIndex , int );
68 BBTK_DECLARE_INPUT ( movingVolumeTimeIndex , int );
69 BBTK_DECLARE_INPUT ( medianFilterSize , std::vector<int> );
70 BBTK_DECLARE_INPUT ( removeIntensityOutliers , double );
71 BBTK_DECLARE_INPUT ( useCachingOfBSplineWeightsMode , std::string );
72 BBTK_DECLARE_INPUT ( useExplicitPDFDerivativesMode , std::string );
73 BBTK_DECLARE_INPUT ( ROIAutoDilateSize , double );
74 BBTK_DECLARE_INPUT ( ROIAutoClosingSize , double );
75 BBTK_DECLARE_INPUT ( relaxationFactor , double );
76 BBTK_DECLARE_INPUT ( maximumStepLength , double );
77 BBTK_DECLARE_INPUT ( failureExitCode , int );
78 BBTK_DECLARE_INPUT ( writeTransformOnFailure , bool );
79 BBTK_DECLARE_INPUT ( numberOfThreads , int );
80 BBTK_DECLARE_INPUT ( forceMINumberOfThreads , int );
81 BBTK_DECLARE_INPUT ( debugLevel , int );
82 BBTK_DECLARE_INPUT ( costFunctionConvergenceFactor , double );
83 BBTK_DECLARE_INPUT ( projectedGradientTolerance , double );
84 BBTK_DECLARE_INPUT ( UseDebugImageViewer , bool );
85 BBTK_DECLARE_INPUT ( PromptAfterImageSend , bool );
86 BBTK_DECLARE_INPUT ( useMomentsAlign , bool );
87 BBTK_DECLARE_INPUT ( useGeometryAlign , bool );
88 BBTK_DECLARE_INPUT ( useCenterOfHeadAlign , bool );
89 BBTK_DECLARE_INPUT ( permitParameterVariation , std::vector<int> );
90 BBTK_DECLARE_INPUT ( costMetric , std::string );
91
92         // EO GENERATED ARGS
93
94         BBTK_PROCESS ( Process ) ;
95         void Process ( ) ;
96     private:
97         void execute ( std::string lib , int _argc , char * _argv[] ) ;
98     } ;
99
100     BBTK_BEGIN_DESCRIBE_BLACK_BOX ( GeneralRegistrationBRAINS , bbtk::AtomicBlackBox ) ;
101     BBTK_NAME ( "GeneralRegistrationBRAINS" ) ;
102     BBTK_AUTHOR ( "Hans J. Johnson, hans-johnson -at- uiowa.edu, http://wwww.psychiatry.uiowa.edu" ) ;
103     BBTK_DESCRIPTION ( "Register a three-dimensional volume to a reference volume Mattes Mutual Information by default. Described in BRAINSFit: Mutual Information Registrations of Whole-Brain 3D Images, Using the Insight Toolkit, Johnson H.J., Harris G., Williams K., The Insight Journal, 2007. http://hdl.handle.net/1926/1291" ) ;
104     BBTK_CATEGORY ( "Registration" ) ;
105
106     // GENERATED DESCRPTION
107     
108 BBTK_INPUT(GeneralRegistrationBRAINS , fixedVolume , "fixedVolume" , std::string, "");
109 BBTK_INPUT(GeneralRegistrationBRAINS , movingVolume , "movingVolume" , std::string, "");
110 BBTK_INPUT(GeneralRegistrationBRAINS , bsplineTransform , "bsplineTransform" , std::string, "");
111 BBTK_INPUT(GeneralRegistrationBRAINS , linearTransform , "linearTransform" , std::string, "");
112 BBTK_INPUT(GeneralRegistrationBRAINS , outputVolume , "outputVolume" , std::string, "");
113 BBTK_INPUT(GeneralRegistrationBRAINS , initialTransform , "initialTransform" , std::string, "");
114 BBTK_INPUT(GeneralRegistrationBRAINS , initializeTransformMode , "initializeTransformMode" , std::string, "");
115 BBTK_INPUT(GeneralRegistrationBRAINS , useRigid , "useRigid" , bool, "");
116 BBTK_INPUT(GeneralRegistrationBRAINS , useScaleVersor3D , "useScaleVersor3D" , bool, "");
117 BBTK_INPUT(GeneralRegistrationBRAINS , useScaleSkewVersor3D , "useScaleSkewVersor3D" , bool, "");
118 BBTK_INPUT(GeneralRegistrationBRAINS , useAffine , "useAffine" , bool, "");
119 BBTK_INPUT(GeneralRegistrationBRAINS , useBSpline , "useBSpline" , bool, "");
120 BBTK_INPUT(GeneralRegistrationBRAINS , numberOfSamples , "numberOfSamples" , int, "");
121 BBTK_INPUT(GeneralRegistrationBRAINS , splineGridSize , "splineGridSize" , std::vector<int>, "");
122 BBTK_INPUT(GeneralRegistrationBRAINS , numberOfIterations , "numberOfIterations" , std::vector<int>, "");
123 BBTK_INPUT(GeneralRegistrationBRAINS , maskProcessingMode , "maskProcessingMode" , std::string, "");
124 BBTK_INPUT(GeneralRegistrationBRAINS , fixedBinaryVolume , "fixedBinaryVolume" , std::string, "");
125 BBTK_INPUT(GeneralRegistrationBRAINS , movingBinaryVolume , "movingBinaryVolume" , std::string, "");
126 BBTK_INPUT(GeneralRegistrationBRAINS , outputFixedVolumeROI , "outputFixedVolumeROI" , std::string, "");
127 BBTK_INPUT(GeneralRegistrationBRAINS , outputMovingVolumeROI , "outputMovingVolumeROI" , std::string, "");
128 BBTK_INPUT(GeneralRegistrationBRAINS , outputVolumePixelType , "outputVolumePixelType" , std::string, "");
129 BBTK_INPUT(GeneralRegistrationBRAINS , backgroundFillValue , "backgroundFillValue" , double, "");
130 BBTK_INPUT(GeneralRegistrationBRAINS , maskInferiorCutOffFromCenter , "maskInferiorCutOffFromCenter" , double, "");
131 BBTK_INPUT(GeneralRegistrationBRAINS , scaleOutputValues , "scaleOutputValues" , bool, "");
132 BBTK_INPUT(GeneralRegistrationBRAINS , interpolationMode , "interpolationMode" , std::string, "");
133 BBTK_INPUT(GeneralRegistrationBRAINS , minimumStepLength , "minimumStepLength" , std::vector<double>, "");
134 BBTK_INPUT(GeneralRegistrationBRAINS , translationScale , "translationScale" , double, "");
135 BBTK_INPUT(GeneralRegistrationBRAINS , reproportionScale , "reproportionScale" , double, "");
136 BBTK_INPUT(GeneralRegistrationBRAINS , skewScale , "skewScale" , double, "");
137 BBTK_INPUT(GeneralRegistrationBRAINS , maxBSplineDisplacement , "maxBSplineDisplacement" , double, "");
138 BBTK_INPUT(GeneralRegistrationBRAINS , histogramMatch , "histogramMatch" , bool, "");
139 BBTK_INPUT(GeneralRegistrationBRAINS , numberOfHistogramBins , "numberOfHistogramBins" , int, "");
140 BBTK_INPUT(GeneralRegistrationBRAINS , numberOfMatchPoints , "numberOfMatchPoints" , int, "");
141 BBTK_INPUT(GeneralRegistrationBRAINS , strippedOutputTransform , "strippedOutputTransform" , std::string, "");
142 BBTK_INPUT(GeneralRegistrationBRAINS , transformType , "transformType" , std::vector<std::string>, "");
143 BBTK_INPUT(GeneralRegistrationBRAINS , outputTransform , "outputTransform" , std::string, "");
144 BBTK_INPUT(GeneralRegistrationBRAINS , fixedVolumeTimeIndex , "fixedVolumeTimeIndex" , int, "");
145 BBTK_INPUT(GeneralRegistrationBRAINS , movingVolumeTimeIndex , "movingVolumeTimeIndex" , int, "");
146 BBTK_INPUT(GeneralRegistrationBRAINS , medianFilterSize , "medianFilterSize" , std::vector<int>, "");
147 BBTK_INPUT(GeneralRegistrationBRAINS , removeIntensityOutliers , "removeIntensityOutliers" , double, "");
148 BBTK_INPUT(GeneralRegistrationBRAINS , useCachingOfBSplineWeightsMode , "useCachingOfBSplineWeightsMode" , std::string, "");
149 BBTK_INPUT(GeneralRegistrationBRAINS , useExplicitPDFDerivativesMode , "useExplicitPDFDerivativesMode" , std::string, "");
150 BBTK_INPUT(GeneralRegistrationBRAINS , ROIAutoDilateSize , "ROIAutoDilateSize" , double, "");
151 BBTK_INPUT(GeneralRegistrationBRAINS , ROIAutoClosingSize , "ROIAutoClosingSize" , double, "");
152 BBTK_INPUT(GeneralRegistrationBRAINS , relaxationFactor , "relaxationFactor" , double, "");
153 BBTK_INPUT(GeneralRegistrationBRAINS , maximumStepLength , "maximumStepLength" , double, "");
154 BBTK_INPUT(GeneralRegistrationBRAINS , failureExitCode , "failureExitCode" , int, "");
155 BBTK_INPUT(GeneralRegistrationBRAINS , writeTransformOnFailure , "writeTransformOnFailure" , bool, "");
156 BBTK_INPUT(GeneralRegistrationBRAINS , numberOfThreads , "numberOfThreads" , int, "");
157 BBTK_INPUT(GeneralRegistrationBRAINS , forceMINumberOfThreads , "forceMINumberOfThreads" , int, "");
158 BBTK_INPUT(GeneralRegistrationBRAINS , debugLevel , "debugLevel" , int, "");
159 BBTK_INPUT(GeneralRegistrationBRAINS , costFunctionConvergenceFactor , "costFunctionConvergenceFactor" , double, "");
160 BBTK_INPUT(GeneralRegistrationBRAINS , projectedGradientTolerance , "projectedGradientTolerance" , double, "");
161 BBTK_INPUT(GeneralRegistrationBRAINS , UseDebugImageViewer , "UseDebugImageViewer" , bool, "");
162 BBTK_INPUT(GeneralRegistrationBRAINS , PromptAfterImageSend , "PromptAfterImageSend" , bool, "");
163 BBTK_INPUT(GeneralRegistrationBRAINS , useMomentsAlign , "useMomentsAlign" , bool, "");
164 BBTK_INPUT(GeneralRegistrationBRAINS , useGeometryAlign , "useGeometryAlign" , bool, "");
165 BBTK_INPUT(GeneralRegistrationBRAINS , useCenterOfHeadAlign , "useCenterOfHeadAlign" , bool, "");
166 BBTK_INPUT(GeneralRegistrationBRAINS , permitParameterVariation , "permitParameterVariation" , std::vector<int>, "");
167 BBTK_INPUT(GeneralRegistrationBRAINS , costMetric , "costMetric" , std::string, "");
168
169     // EO GENERATED DESCRIPTION
170
171     BBTK_END_DESCRIBE_BLACK_BOX ( GeneralRegistrationBRAINS ) ;
172 }
173
174 #endif // __bbSlicerGeneralRegistrationBRAINS_h_INCLUDED__
175
176