Skip to content

Commit 5325070

Browse files
committed
fix: updated traits to ensure defaults are used
1 parent 7772438 commit 5325070

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

nipype/interfaces/nipy/preprocess.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
else:
1616
from nipy.labs.mask import compute_mask
1717
from nipy.algorithms.registration import FmriRealign4d as FR4d
18-
from nipy import save_image
18+
from nipy import save_image, load_image
1919

2020
from ..base import (TraitedSpec, BaseInterface, traits,
2121
BaseInterfaceInputSpec, isdefined, File,
@@ -85,13 +85,13 @@ class FmriRealign4dInputSpec(BaseInterfaceInputSpec):
8585
desc="Assume smooth changes across time e.g.,\
8686
fmri series. If you don't want slice timing \
8787
correction set this to undefined")
88-
loops = InputMultiPath(traits.Int(5), usedefault=True,
88+
loops = InputMultiPath([5], traits.Int, usedefault=True,
8989
desc="loops within each run")
90-
between_loops = InputMultiPath(traits.Int(5),
90+
between_loops = InputMultiPath([5], traits.Int,
9191
usedefault=True, desc="loops used to \
9292
realign different \
9393
runs")
94-
speedup = InputMultiPath(traits.Int(5),
94+
speedup = InputMultiPath([5], traits.Int,
9595
usedefault=True,
9696
desc="successive image \
9797
sub-sampling factors \
@@ -136,12 +136,7 @@ class FmriRealign4d(BaseInterface):
136136

137137
def _run_interface(self, runtime):
138138

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]
145140

146141
if not isdefined(self.inputs.tr_slices):
147142
TR_slices = None

0 commit comments

Comments
 (0)