@@ -813,16 +813,15 @@ def _list_outputs(self):
813
813
os .getcwd (),
814
814
self .inputs .out_prefix + "BrainSegmentation0N4." + self .inputs .image_suffix ,
815
815
)
816
- posteriors = []
817
- for i in range (len (self .inputs .segmentation_priors )):
818
- posteriors .append (
819
- os .path .join (
820
- os .getcwd (),
821
- self .inputs .out_prefix
822
- + "BrainSegmentationPosteriors%02d." % (i + 1 )
823
- + self .inputs .image_suffix ,
824
- )
816
+ posteriors = [
817
+ os .path .join (
818
+ os .getcwd (),
819
+ self .inputs .out_prefix
820
+ + "BrainSegmentationPosteriors%02d." % (i + 1 )
821
+ + self .inputs .image_suffix ,
825
822
)
823
+ for i in range (len (self .inputs .segmentation_priors ))
824
+ ]
826
825
outputs ["BrainSegmentationPosteriors" ] = posteriors
827
826
outputs ["CorticalThickness" ] = os .path .join (
828
827
os .getcwd (),
@@ -1488,15 +1487,13 @@ class JointFusion(ANTSCommand):
1488
1487
1489
1488
def _format_arg (self , opt , spec , val ):
1490
1489
if opt == "exclusion_image_label" :
1491
- retval = []
1492
- for ii in range (len (self .inputs .exclusion_image_label )):
1493
- retval .append (
1494
- "-e {}[{}]" .format (
1495
- self .inputs .exclusion_image_label [ii ],
1496
- self .inputs .exclusion_image [ii ],
1497
- )
1490
+ return " " .join (
1491
+ "-e {}[{}]" .format (
1492
+ self .inputs .exclusion_image_label [ii ],
1493
+ self .inputs .exclusion_image [ii ],
1498
1494
)
1499
- return " " .join (retval )
1495
+ for ii in range (len (self .inputs .exclusion_image_label ))
1496
+ )
1500
1497
if opt == "patch_radius" :
1501
1498
return f"-p { self ._format_xarray (val )} "
1502
1499
if opt == "search_radius" :
0 commit comments