Skip to content

Commit dd1ed4f

Browse files
authored
Merge pull request #1879 from oesteban/fix/AntsJointFusion
[FIX] Doctest of antsJointFusion failing
2 parents d6bcef9 + 59a146d commit dd1ed4f

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

nipype/interfaces/ants/segmentation.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1130,28 +1130,29 @@ def _format_arg(self, opt, spec, val):
11301130
if not isdefined(self.inputs.out_label_fusion):
11311131
retval = '-o {0}'.format(self.inputs.out_intensity_fusion_name_format)
11321132
elif opt == 'atlas_image':
1133-
atlas_image_cmd=" ".join(
1134-
[ '-g [{0}]'.format(",".join(
1135-
fn for fn in ai) ) for ai in self.inputs.atlas_image]
1133+
atlas_image_cmd = " ".join(
1134+
['-g [{0}]'.format(", ".join("'%s'" % fn for fn in ai))
1135+
for ai in self.inputs.atlas_image]
11361136
)
11371137
retval = atlas_image_cmd
11381138
elif opt == 'target_image':
1139-
target_image_cmd=" ".join(
1140-
[ '-t [{0}]'.format(",".join(
1141-
fn for fn in ai) ) for ai in self.inputs.target_image]
1139+
target_image_cmd = " ".join(
1140+
['-t [{0}]'.format(", ".join("'%s'" % fn for fn in ai))
1141+
for ai in self.inputs.target_image]
11421142
)
11431143
retval = target_image_cmd
11441144
elif opt == 'atlas_segmentation_image':
11451145
assert len(val) == len(self.inputs.atlas_image), "Number of specified " \
11461146
"segmentations should be identical to the number of atlas image " \
11471147
"sets {0}!={1}".format(len(val), len(self.inputs.atlas_image))
1148-
atlas_segmentation_image_cmd=" ".join(
1149-
[ '-t [{0}]'.format( fn ) for fn in self.inputs.atlas_segmentation_image ]
1148+
1149+
atlas_segmentation_image_cmd = " ".join(
1150+
['-l {0}'.format(fn) for fn in self.inputs.atlas_segmentation_image]
11501151
)
11511152
retval = atlas_segmentation_image_cmd
11521153
else:
11531154

1154-
return super(ANTSCommand, self)._format_arg(opt, spec, val)
1155+
return super(AntsJointFusion, self)._format_arg(opt, spec, val)
11551156
return retval
11561157

11571158
def _list_outputs(self):

0 commit comments

Comments
 (0)