-
Notifications
You must be signed in to change notification settings - Fork 536
Closed
Description
This issue is secondary to #531.
After you apply the patch from #532, if you use one of the values for write_which that prevent the reslicing of all images (eg. [0, 1]), this part of Realign's _list_outputs fails, because it tries to add files to the output that have not in fact been created.
if self.inputs.jobtype == "write" or self.inputs.jobtype == "estwrite":
if isinstance(self.inputs.in_files[0], list):
first_image = self.inputs.in_files[0][0]
else:
first_image = self.inputs.in_files[0]
outputs['mean_image'] = fname_presuffix(first_image, prefix='mean')
outputs['realigned_files'] = []
for imgf in filename_to_list(self.inputs.in_files):
realigned_run = []
if isinstance(imgf,list):
for inner_imgf in filename_to_list(imgf):
realigned_run.append(fname_presuffix(inner_imgf, prefix=self.inputs.out_prefix))
else:
realigned_run = fname_presuffix(imgf, prefix=self.inputs.out_prefix)
outputs['realigned_files'].append(realigned_run)
I will submit a pull request to address this shortly.
Metadata
Metadata
Assignees
Labels
No labels