@@ -1352,34 +1352,32 @@ def aggregate_outputs(self, runtime=None, needed_outputs=None):
1352
1352
return outputs
1353
1353
1354
1354
1355
-
1356
-
1357
-
1358
1355
class RegistrationSynQuickInputSpec (ANTSCommandInputSpec ):
1359
1356
dimension = traits .Enum (3 , 2 , argstr = '-d %d' ,
1360
1357
usedefault = True , desc = 'image dimension (2 or 3)' )
1361
1358
fixed_image = InputMultiPath (File (exists = True ), mandatory = True , argstr = '-f %s' ,
1362
1359
desc = 'Fixed image or source image or reference image' )
1363
1360
moving_image = InputMultiPath (File (exists = True ), mandatory = True , argstr = '-m %s' ,
1364
1361
desc = 'Moving image or target image' )
1365
- output_prefix = traits . Str ("transform" , usedefault = True , argstr = '-o %s' ,
1366
- desc = "A prefix that is prepended to all output files" )
1362
+ output_prefix = Str ("transform" , usedefault = True , argstr = '-o %s' ,
1363
+ desc = "A prefix that is prepended to all output files" )
1367
1364
1368
1365
# todo ANTSCommandInputSpec already has this, but I can't figure out how to set it without defining it again
1369
1366
num_threads = traits .Int (default_value = 1 , desc = 'Number of threads (default = 1)' , argstr = '-n %d' )
1370
1367
1371
1368
transform_type = traits .Enum ('s' , 't' , 'r' , 'a' , 'sr' , 'b' , 'br' , argstr = '-t %s' ,
1372
- desc = 'transform type\n \
1373
- t: translation\
1374
- r: rigid \n \
1375
- a: rigid + affine\n \
1376
- s: rigid + affine + deformable syn (default)\
1377
- sr: rigid + deformable syn\
1378
- b: rigid + affine + deformable b-spline syn\n \
1379
- br: rigid + deformable b-spline syn' ,
1369
+ desc = """
1370
+ transform type
1371
+ t: translation
1372
+ r: rigid
1373
+ a: rigid + affine
1374
+ s: rigid + affine + deformable syn (default)
1375
+ sr: rigid + deformable syn
1376
+ b: rigid + affine + deformable b-spline syn
1377
+ br: rigid + deformable b-spline syn""" ,
1380
1378
usedefault = True )
1381
1379
1382
- use_histogram_matching = traits .Bool (default = False , argstr = '-j %s ' ,
1380
+ use_histogram_matching = traits .Bool (False , argstr = '-j %d ' ,
1383
1381
desc = 'use histogram matching' )
1384
1382
histogram_bins = traits .Int (default_value = 32 , argstr = '-r %d' ,
1385
1383
desc = 'histogram bins for mutual information in SyN stage \
@@ -1412,13 +1410,8 @@ class RegistrationSynQuick(ANTSCommand):
1412
1410
output_spec = RegistrationSynQuickOutputSpec
1413
1411
1414
1412
def _format_arg (self , name , spec , value ):
1415
- if name == 'use_histogram_matching' :
1416
- if isdefined (self .inputs .use_histogram_matching ):
1417
- return spec .argstr % {False : '0' , True : '1' }[value ]
1418
-
1419
- elif name == 'precision_type' :
1420
- if isdefined (self .inputs .precision_type ):
1421
- return spec .argstr % {'float' : 'f' , 'double' : 'd' }[value ]
1413
+ if name == 'precision_type' :
1414
+ return spec .argstr % value [0 ]
1422
1415
return super (RegistrationSynQuick , self )._format_arg (name , spec , value )
1423
1416
1424
1417
def _list_outputs (self ):
0 commit comments