|
15 | 15 | else:
|
16 | 16 | from nipy.labs.mask import compute_mask
|
17 | 17 | from nipy.algorithms.registration import FmriRealign4d as FR4d
|
18 |
| - from nipy import save_image |
| 18 | + from nipy import save_image, load_image |
19 | 19 |
|
20 | 20 | from ..base import (TraitedSpec, BaseInterface, traits,
|
21 | 21 | BaseInterfaceInputSpec, isdefined, File,
|
@@ -85,13 +85,13 @@ class FmriRealign4dInputSpec(BaseInterfaceInputSpec):
|
85 | 85 | desc="Assume smooth changes across time e.g.,\
|
86 | 86 | fmri series. If you don't want slice timing \
|
87 | 87 | correction set this to undefined")
|
88 |
| - loops = InputMultiPath(traits.Int(5), usedefault=True, |
| 88 | + loops = InputMultiPath([5], traits.Int, usedefault=True, |
89 | 89 | desc="loops within each run")
|
90 |
| - between_loops = InputMultiPath(traits.Int(5), |
| 90 | + between_loops = InputMultiPath([5], traits.Int, |
91 | 91 | usedefault=True, desc="loops used to \
|
92 | 92 | realign different \
|
93 | 93 | runs")
|
94 |
| - speedup = InputMultiPath(traits.Int(5), |
| 94 | + speedup = InputMultiPath([5], traits.Int, |
95 | 95 | usedefault=True,
|
96 | 96 | desc="successive image \
|
97 | 97 | sub-sampling factors \
|
@@ -136,12 +136,7 @@ class FmriRealign4d(BaseInterface):
|
136 | 136 |
|
137 | 137 | def _run_interface(self, runtime):
|
138 | 138 |
|
139 |
| - all_ims = [] |
140 |
| - |
141 |
| - for image in self.inputs.in_file: |
142 |
| - im = nb.load(image) |
143 |
| - im.affine = im.get_affine() |
144 |
| - all_ims.append(im) |
| 139 | + all_ims = [load_image(fname) for fname in self.inputs.in_file] |
145 | 140 |
|
146 | 141 | if not isdefined(self.inputs.tr_slices):
|
147 | 142 | TR_slices = None
|
|
0 commit comments