@@ -1293,16 +1293,12 @@ def _format_arg(self, opt, spec, val):
12931293 do_center_of_mass_init ,
12941294 )
12951295 elif opt == "interpolation" :
1296- if (
1297- self .inputs .interpolation
1298- in [
1299- "BSpline" ,
1300- "MultiLabel" ,
1301- "Gaussian" ,
1302- "GenericLabel" ,
1303- ]
1304- and isdefined (self .inputs .interpolation_parameters )
1305- ):
1296+ if self .inputs .interpolation in [
1297+ "BSpline" ,
1298+ "MultiLabel" ,
1299+ "Gaussian" ,
1300+ "GenericLabel" ,
1301+ ] and isdefined (self .inputs .interpolation_parameters ):
13061302 return "--interpolation %s[ %s ]" % (
13071303 self .inputs .interpolation ,
13081304 ", " .join (
@@ -1595,14 +1591,17 @@ class MeasureImageSimilarity(ANTSCommand):
15951591 output_spec = MeasureImageSimilarityOutputSpec
15961592
15971593 def _metric_constructor (self ):
1598- retval = '--metric {metric}["{fixed_image}","{moving_image}",{metric_weight},' "{radius_or_number_of_bins},{sampling_strategy},{sampling_percentage}]" .format (
1599- metric = self .inputs .metric ,
1600- fixed_image = self .inputs .fixed_image ,
1601- moving_image = self .inputs .moving_image ,
1602- metric_weight = self .inputs .metric_weight ,
1603- radius_or_number_of_bins = self .inputs .radius_or_number_of_bins ,
1604- sampling_strategy = self .inputs .sampling_strategy ,
1605- sampling_percentage = self .inputs .sampling_percentage ,
1594+ retval = (
1595+ '--metric {metric}["{fixed_image}","{moving_image}",{metric_weight},'
1596+ "{radius_or_number_of_bins},{sampling_strategy},{sampling_percentage}]" .format (
1597+ metric = self .inputs .metric ,
1598+ fixed_image = self .inputs .fixed_image ,
1599+ moving_image = self .inputs .moving_image ,
1600+ metric_weight = self .inputs .metric_weight ,
1601+ radius_or_number_of_bins = self .inputs .radius_or_number_of_bins ,
1602+ sampling_strategy = self .inputs .sampling_strategy ,
1603+ sampling_percentage = self .inputs .sampling_percentage ,
1604+ )
16061605 )
16071606 return retval
16081607
0 commit comments