@@ -183,14 +183,13 @@ class RegistrationInputSpec(ANTSCommandInputSpec):
183
183
desc = "Note that the metricWeight is currently not used. \
184
184
Rather, it is a temporary place holder until multivariate \
185
185
metrics are available for a single stage." )
186
- ## This is interpreted as number_of_bins for MI and Mattes, and as radius for all other metrics
186
+ ### This is interpreted as number_of_bins for MI and Mattes, and as radius for all other metrics
187
187
radius_or_number_of_bins = traits .List (traits .Int (5 ), usedefault = True ,
188
188
requires = ['metric_weight' ], desc = '' )
189
189
sampling_strategy = traits .List (trait = traits .Enum ("Dense" ,"Regular" , "Random" , None ), value = ['Dense' ], minlen = 1 , usedefault = True ,
190
190
requires = ['metric_weight' ], desc = '' )
191
- sampling_percentage = traits .List (value = [None ],minlen = 1 ,
191
+ sampling_percentage = traits .List (trait = traits . Either ( traits . Range ( low = 0.0 , high = 1.0 ), None ), value = [None ],minlen = 1 ,
192
192
requires = ['sampling_strategy' ], desc = '' )
193
-
194
193
use_estimate_learning_rate_once = traits .List (traits .Bool (), desc = '' )
195
194
use_histogram_matching = traits .List (traits .Bool (argstr = '%s' ), default = True , usedefault = True )
196
195
# Interpolation flag
@@ -212,7 +211,13 @@ class RegistrationInputSpec(ANTSCommandInputSpec):
212
211
'TimeVaryingBSplineVelocityField' , 'SyN' , 'BSplineSyN' ,
213
212
'Exponential' , 'BSplineExponential' ), argstr = '%s' , mandatory = True )
214
213
# TODO: transform_parameters currently supports rigid, affine, composite affine, translation, bspline, gaussian displacement field (gdf), and SyN -----ONLY-----!
215
- transform_parameters = traits .List ()
214
+ transform_parameters = traits .List (
215
+ traits .Either (
216
+ traits .Float (),
217
+ traits .Tuple (traits .Float ()),
218
+ traits .Tuple (traits .Float (), # gdf & syn
219
+ traits .Float (),
220
+ traits .Float ())))
216
221
# Convergence flags
217
222
number_of_iterations = traits .List (traits .List (traits .Int ()))
218
223
smoothing_sigmas = traits .List (traits .List (traits .Int ()))
@@ -221,8 +226,8 @@ class RegistrationInputSpec(ANTSCommandInputSpec):
221
226
convergence_window_size = traits .List (trait = traits .Int (), value = [10 ],minlen = 1 , requires = ['convergence_threshold' ], usedefault = True )
222
227
# Output flags
223
228
output_transform_prefix = traits .Str ("transform" , usedefault = True , argstr = "%s" , desc = "" )
224
- output_warped_image = traits .Any ( hash_files = False , desc = "" )
225
- output_inverse_warped_image = traits .Any ( hash_files = False , requires = ['output_warped_image' ], desc = "" )
229
+ output_warped_image = traits .Either ( traits . Bool , File (), hash_files = False , desc = "" )
230
+ output_inverse_warped_image = traits .Either ( traits . Bool , File (), hash_files = False , requires = ['output_warped_image' ], desc = "" )
226
231
227
232
class RegistrationOutputSpec (TraitedSpec ):
228
233
forward_transforms = traits .List (File (exists = True ), desc = 'List of output transforms for forward registration' )
0 commit comments