Skip to content
Closed
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
11 changes: 5 additions & 6 deletions nipype/interfaces/spm/preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,18 +322,17 @@ class Coregister(SPMCommand):
def _format_arg(self, opt, spec, val):
"""Convert input to appropriate format for spm
"""
if opt == 'target' or (opt == 'source' and self.inputs.jobtype != "write"):
return scans_for_fnames(filename_to_list(val),
keep4d=True)
if opt == 'target' or (opt == 'source' and "write" not in self.inputs.jobtype):
return scans_for_fnames(filename_to_list(val))
if opt == 'apply_to_files':
return np.array(filename_to_list(val), dtype=object)
if opt == 'source' and self.inputs.jobtype == "write":
return scans_for_fnames(filename_to_list(val))
if opt == 'source' and "write" in self.inputs.jobtype:
if isdefined(self.inputs.apply_to_files):
return scans_for_fnames(val + self.inputs.apply_to_files)
else:
return scans_for_fnames(val)
return super(Coregister, self)._format_arg(opt, spec, val)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extra spaces.

def _parse_inputs(self):
"""validate spm coregister options if set to None ignore
"""
Expand Down