@@ -1352,34 +1352,32 @@ def aggregate_outputs(self, runtime=None, needed_outputs=None):
13521352 return outputs
13531353
13541354
1355-
1356-
1357-
13581355class RegistrationSynQuickInputSpec (ANTSCommandInputSpec ):
13591356 dimension = traits .Enum (3 , 2 , argstr = '-d %d' ,
13601357 usedefault = True , desc = 'image dimension (2 or 3)' )
13611358 fixed_image = InputMultiPath (File (exists = True ), mandatory = True , argstr = '-f %s' ,
13621359 desc = 'Fixed image or source image or reference image' )
13631360 moving_image = InputMultiPath (File (exists = True ), mandatory = True , argstr = '-m %s' ,
13641361 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" )
13671364
13681365 # todo ANTSCommandInputSpec already has this, but I can't figure out how to set it without defining it again
13691366 num_threads = traits .Int (default_value = 1 , desc = 'Number of threads (default = 1)' , argstr = '-n %d' )
13701367
13711368 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""" ,
13801378 usedefault = True )
13811379
1382- use_histogram_matching = traits .Bool (default = False , argstr = '-j %s ' ,
1380+ use_histogram_matching = traits .Bool (False , argstr = '-j %d ' ,
13831381 desc = 'use histogram matching' )
13841382 histogram_bins = traits .Int (default_value = 32 , argstr = '-r %d' ,
13851383 desc = 'histogram bins for mutual information in SyN stage \
@@ -1412,13 +1410,8 @@ class RegistrationSynQuick(ANTSCommand):
14121410 output_spec = RegistrationSynQuickOutputSpec
14131411
14141412 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 ]
14221415 return super (RegistrationSynQuick , self )._format_arg (name , spec , value )
14231416
14241417 def _list_outputs (self ):
0 commit comments