Skip to content

Commit d03ea56

Browse files
committed
in_files -> modified_in_files
also fixes an embarassing if clause, and sets realigned_files to in_files if jobtype is "estimate"
1 parent 0731614 commit d03ea56

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

nipype/interfaces/spm/preprocess.py

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -149,16 +149,18 @@ class RealignInputSpec(SPMCommandInputSpec):
149149

150150
class RealignOutputSpec(TraitedSpec):
151151
mean_image = File(exists=True, desc='Mean image file from the realignment')
152-
in_files = OutputMultiPath(traits.Either(traits.List(File(exists=True)),
152+
modified_in_files = OutputMultiPath(traits.Either(traits.List(File(exists=True)),
153153
File(exists=True)),
154-
desc='Copies of all files passed to in_files.\
155-
Headers will have been modified to align all\
156-
images with the first, or optionally to first\
157-
do that, extract a mean image, and re-align to\
158-
that mean image.')
154+
desc='Copies of all files passed to in_files.\
155+
Headers will have been modified to align all\
156+
images with the first, or optionally to first\
157+
do that, extract a mean image, and re-align to\
158+
that mean image.')
159159
realigned_files = OutputMultiPath(traits.Either(traits.List(File(exists=True)),
160160
File(exists=True)),
161-
desc='Realigned files')
161+
desc='If jobtype is write or estwrite, these will be the\
162+
resliced files. Otherwise, they will be copies of\
163+
in_files that have had their headers rewritten.')
162164
realignment_parameters = OutputMultiPath(File(exists=True),
163165
desc='Estimated translation and rotation parameters')
164166

@@ -217,8 +219,10 @@ def _list_outputs(self):
217219
use_ext=False))
218220
if not isinstance(imgf, list) and func_is_3d(imgf):
219221
break
220-
if self.inputs.jobtype = "estimate" or self.inputs.jobtype = "estwrite":
221-
outputs['in_files'] = self.inputs.in_files
222+
if self.inputs.jobtype == "estimate":
223+
outputs['realigned_files'] = self.inputs.in_files
224+
if self.inputs.jobtype == "estimate" or self.inputs.jobtype == "estwrite":
225+
outputs['modified_in_files'] = self.inputs.in_files
222226
if self.inputs.jobtype == "write" or self.inputs.jobtype == "estwrite":
223227
if isinstance(self.inputs.in_files[0], list):
224228
first_image = self.inputs.in_files[0][0]

0 commit comments

Comments
 (0)