@@ -805,16 +805,15 @@ def _list_outputs(self):
805805 os .getcwd (),
806806 self .inputs .out_prefix + "BrainSegmentation0N4." + self .inputs .image_suffix ,
807807 )
808- posteriors = []
809- for i in range (len (self .inputs .segmentation_priors )):
810- posteriors .append (
811- os .path .join (
812- os .getcwd (),
813- self .inputs .out_prefix
814- + "BrainSegmentationPosteriors%02d." % (i + 1 )
815- + self .inputs .image_suffix ,
816- )
808+ posteriors = [
809+ os .path .join (
810+ os .getcwd (),
811+ self .inputs .out_prefix
812+ + "BrainSegmentationPosteriors%02d." % (i + 1 )
813+ + self .inputs .image_suffix ,
817814 )
815+ for i in range (len (self .inputs .segmentation_priors ))
816+ ]
818817 outputs ["BrainSegmentationPosteriors" ] = posteriors
819818 outputs ["CorticalThickness" ] = os .path .join (
820819 os .getcwd (),
@@ -1480,15 +1479,13 @@ class JointFusion(ANTSCommand):
14801479
14811480 def _format_arg (self , opt , spec , val ):
14821481 if opt == "exclusion_image_label" :
1483- retval = []
1484- for ii in range (len (self .inputs .exclusion_image_label )):
1485- retval .append (
1486- "-e {}[{}]" .format (
1487- self .inputs .exclusion_image_label [ii ],
1488- self .inputs .exclusion_image [ii ],
1489- )
1482+ return " " .join (
1483+ "-e {}[{}]" .format (
1484+ self .inputs .exclusion_image_label [ii ],
1485+ self .inputs .exclusion_image [ii ],
14901486 )
1491- return " " .join (retval )
1487+ for ii in range (len (self .inputs .exclusion_image_label ))
1488+ )
14921489 if opt == "patch_radius" :
14931490 return f"-p { self ._format_xarray (val )} "
14941491 if opt == "search_radius" :
0 commit comments