-
Notifications
You must be signed in to change notification settings - Fork 200
/
DemonsRegistrationFilter.json
195 lines (195 loc) · 9.21 KB
/
DemonsRegistrationFilter.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
{
"name" : "DemonsRegistrationFilter",
"template_code_filename" : "ImageFilter",
"template_test_filename" : "ImageFilter",
"no_procedure" : "1",
"number_of_inputs" : 0,
"pixel_types" : "BasicPixelIDTypeList",
"output_image_type" : "itk::Image< Vector<double, TImageType::ImageDimension>, TImageType::ImageDimension >",
"filter_type" : "itk::DemonsRegistrationFilter<TImageType, TImageType, OutputImageType>",
"include_files" : [
"sitkImageConvert.h"
],
"inputs" : [
{
"name" : "FixedImage",
"type" : "Image",
"custom_itk_cast" : "filter->SetFixedImage( this->CastImageToITK<typename FilterType::FixedImageType>(*inFixedImage) );"
},
{
"name" : "MovingImage",
"type" : "Image"
},
{
"name" : "InitialDisplacementField",
"type" : "Image",
"optional" : true,
"custom_itk_cast" : " typedef itk::VectorImage<double, FilterType::DisplacementFieldType::ImageDimension> VectorImageType;\n filter->SetInitialDisplacementField( GetImageFromVectorImage(const_cast<VectorImageType*>(CastImageToITK<VectorImageType>(*inInitialDisplacementField).GetPointer()) ) );"
}
],
"members" : [
{
"name" : "StandardDeviations",
"type" : "double",
"dim_vec" : 1,
"set_as_scalar" : 1,
"default" : "std::vector<double>(3, 1.0)",
"itk_type" : "typename FilterType::StandardDeviationsType",
"detaileddescriptionSet" : "Set/Get the Gaussian smoothing standard deviations for the displacement field. The values are set with respect to pixel coordinates.",
"detaileddescriptionGet" : "Set/Get the Gaussian smoothing standard deviations for the displacement field. The values are set with respect to pixel coordinates."
},
{
"name" : "NumberOfIterations",
"type" : "uint32_t",
"default" : "10u",
"doc" : "Number of iterations to run"
},
{
"name" : "MaximumRMSError",
"type" : "double",
"default" : 0.02,
"doc" : "Value of RMS change below which the filter should stop. This is a convergence criterion."
},
{
"name" : "UseMovingImageGradient",
"type" : "bool",
"default" : false,
"briefdescriptionSet" : "",
"detaileddescriptionSet" : "Switch between using the fixed image and moving image gradient for computing the displacement field updates.",
"briefdescriptionGet" : "",
"detaileddescriptionGet" : "Switch between using the fixed image and moving image gradient for computing the displacement field updates."
},
{
"name" : "SmoothDisplacementField",
"type" : "bool",
"default" : true,
"detaileddescriptionSet" : "Set/Get whether the displacement field is smoothed (regularized). Smoothing the displacement yields a solution elastic in nature. If SmoothDisplacementField is on, then the displacement field is smoothed with a Gaussian whose standard deviations are specified with SetStandardDeviations()",
"detaileddescriptionGet" : "Set/Get whether the displacement field is smoothed (regularized). Smoothing the displacement yields a solution elastic in nature. If SmoothDisplacementField is on, then the displacement field is smoothed with a Gaussian whose standard deviations are specified with SetStandardDeviations()"
},
{
"name" : "SmoothUpdateField",
"type" : "bool",
"default" : false,
"detaileddescriptionSet" : "Set/Get whether the update field is smoothed (regularized). Smoothing the update field yields a solution viscous in nature. If SmoothUpdateField is on, then the update field is smoothed with a Gaussian whose standard deviations are specified with SetUpdateFieldStandardDeviations()",
"detaileddescriptionGet" : "Set/Get whether the update field is smoothed (regularized). Smoothing the update field yields a solution viscous in nature. If SmoothUpdateField is on, then the update field is smoothed with a Gaussian whose standard deviations are specified with SetUpdateFieldStandardDeviations()"
},
{
"name" : "UpdateFieldStandardDeviations",
"type" : "double",
"dim_vec" : 1,
"set_as_scalar" : 1,
"default" : "std::vector<double>(3, 1.0)",
"itk_type" : "typename FilterType::StandardDeviationsType",
"detaileddescriptionSet" : "Set the Gaussian smoothing standard deviations for the update field. The values are set with respect to pixel coordinates.",
"detaileddescriptionGet" : "Set the Gaussian smoothing standard deviations for the update field. The values are set with respect to pixel coordinates."
},
{
"name" : "MaximumKernelWidth",
"type" : "unsigned int",
"default" : "30u",
"detaileddescriptionSet" : "Set/Get the desired limits of the Gaussian kernel width.",
"detaileddescriptionGet" : "Set/Get the desired limits of the Gaussian kernel width."
},
{
"name" : "MaximumError",
"type" : "double",
"default" : "0.1",
"detaileddescriptionSet" : "Set/Get the desired maximum error of the Guassian kernel approximate.",
"detaileddescriptionGet" : "Set/Get the desired maximum error of the Guassian kernel approximate."
},
{
"name" : "IntensityDifferenceThreshold",
"type" : "double",
"default" : "0.001",
"briefdescriptionSet" : "",
"detaileddescriptionSet" : "Set/Get the threshold below which the absolute difference of intensity yields a match. When the intensities match between a moving and fixed image pixel, the update vector (for that iteration) will be the zero vector. Default is 0.001.",
"briefdescriptionGet" : "",
"detaileddescriptionGet" : ""
},
{
"name" : "UseImageSpacing",
"type" : "bool",
"default" : true
}
],
"measurements" : [
{
"name" : "ElapsedIterations",
"type" : "uint32_t",
"active" : true,
"default" : 0,
"briefdescriptionGet" : "Number of iterations run."
},
{
"name" : "RMSChange",
"type" : "double",
"default" : 0.0,
"briefdescriptionGet" : "The Root Mean Square of the levelset upon termination."
},
{
"name" : "Metric",
"type" : "double",
"active" : true,
"default" : 0.0,
"briefdescriptionGet" : "",
"detaileddescriptionGet" : "Get the metric value. The metric value is the mean square difference in intensity between the fixed image and transforming moving image computed over the the overlapping region between the two images. This is value is only available for the previous iteration and NOT the current iteration."
}
],
"tests" : [
{
"tag" : "2d",
"description" : "2D",
"settings" : [],
"tolerance" : "1e-3",
"inputs" : [
"Input/BrainProtonDensitySliceBorder20.png",
"Input/BrainProtonDensitySliceBSplined10.png"
],
"measurements_results" : [
{
"name" : "ElapsedIterations",
"value" : "10u"
},
{
"name" : "RMSChange",
"value" : 0.28376284179066474,
"tolerance" : 1e-06
},
{
"name" : "Metric",
"value" : 771.7528659105926,
"tolerance" : 0.0001
}
]
},
{
"tag" : "2d_with_initial",
"description" : "2D With Initial Displacement",
"settings" : [],
"tolerance" : "1e-8",
"inputs" : [
"Input/BrainProtonDensitySliceBorder20.png",
"Input/BrainProtonDensitySliceBSplined10.png",
"Input/BrainProtonDensitySlice20InitialDisplacement.mha"
],
"measurements_results" : [
{
"name" : "ElapsedIterations",
"value" : "10u"
},
{
"name" : "RMSChange",
"value" : 0.2829118,
"tolerance" : 1e-06
},
{
"name" : "Metric",
"value" : 565.08109,
"tolerance" : 0.0001
}
]
}
],
"briefdescription" : "Deformably register two images using the demons algorithm.",
"detaileddescription" : "DemonsRegistrationFilter implements the demons deformable algorithm that register two images by computing the displacement field which will map a moving image onto a fixed image.\n\nA displacement field is represented as a image whose pixel type is some vector type with at least N elements, where N is the dimension of the fixed image. The vector type must support element access via operator []. It is assumed that the vector elements behave like floating point scalars.\n\nThis class is templated over the fixed image type, moving image type and the displacement field type.\n\nThe input fixed and moving images are set via methods SetFixedImage and SetMovingImage respectively. An initial displacement field maybe set via SetInitialDisplacementField or SetInput. If no initial field is set, a zero field is used as the initial condition.\n\nThe algorithm has one parameters: the number of iteration to be performed.\n\nThe output displacement field can be obtained via methods GetOutput or GetDisplacementField.\n\nThis class make use of the finite difference solver hierarchy. Update for each iteration is computed in DemonsRegistrationFunction .\n\n\\warning This filter assumes that the fixed image type, moving image type and displacement field type all have the same number of dimensions.\n\n\\see DemonsRegistrationFunction"
}