@@ -805,16 +805,15 @@ def _list_outputs(self):
805
805
os .getcwd (),
806
806
self .inputs .out_prefix + "BrainSegmentation0N4." + self .inputs .image_suffix ,
807
807
)
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 ,
817
814
)
815
+ for i in range (len (self .inputs .segmentation_priors ))
816
+ ]
818
817
outputs ["BrainSegmentationPosteriors" ] = posteriors
819
818
outputs ["CorticalThickness" ] = os .path .join (
820
819
os .getcwd (),
@@ -1480,15 +1479,13 @@ class JointFusion(ANTSCommand):
1480
1479
1481
1480
def _format_arg (self , opt , spec , val ):
1482
1481
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 ],
1490
1486
)
1491
- return " " .join (retval )
1487
+ for ii in range (len (self .inputs .exclusion_image_label ))
1488
+ )
1492
1489
if opt == "patch_radius" :
1493
1490
return f"-p { self ._format_xarray (val )} "
1494
1491
if opt == "search_radius" :
0 commit comments