Skip to content

[FIX] Doctest of antsJointFusion failing #1879

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 14, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions nipype/interfaces/ants/segmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -1130,28 +1130,29 @@ def _format_arg(self, opt, spec, val):
if not isdefined(self.inputs.out_label_fusion):
retval = '-o {0}'.format(self.inputs.out_intensity_fusion_name_format)
elif opt == 'atlas_image':
atlas_image_cmd=" ".join(
[ '-g [{0}]'.format(",".join(
fn for fn in ai) ) for ai in self.inputs.atlas_image]
atlas_image_cmd = " ".join(
['-g [{0}]'.format(", ".join("'%s'" % fn for fn in ai))
for ai in self.inputs.atlas_image]
)
retval = atlas_image_cmd
elif opt == 'target_image':
target_image_cmd=" ".join(
[ '-t [{0}]'.format(",".join(
fn for fn in ai) ) for ai in self.inputs.target_image]
target_image_cmd = " ".join(
['-t [{0}]'.format(", ".join("'%s'" % fn for fn in ai))
for ai in self.inputs.target_image]
)
retval = target_image_cmd
elif opt == 'atlas_segmentation_image':
assert len(val) == len(self.inputs.atlas_image), "Number of specified " \
"segmentations should be identical to the number of atlas image " \
"sets {0}!={1}".format(len(val), len(self.inputs.atlas_image))
atlas_segmentation_image_cmd=" ".join(
[ '-t [{0}]'.format( fn ) for fn in self.inputs.atlas_segmentation_image ]

atlas_segmentation_image_cmd = " ".join(
['-l {0}'.format(fn) for fn in self.inputs.atlas_segmentation_image]
)
retval = atlas_segmentation_image_cmd
else:

return super(ANTSCommand, self)._format_arg(opt, spec, val)
return super(AntsJointFusion, self)._format_arg(opt, spec, val)
return retval

def _list_outputs(self):
Expand Down