Skip to content

Commit 2282145

Browse files
committed
spm does not support gz
1 parent 53468eb commit 2282145

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

examples/test_spm.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import nipype.pipeline.engine as pe
22
from nipype.interfaces import spm
33
from nipype.interfaces import fsl
4+
from nipype.algorithms.misc import Gunzip
45
import os
56

67
in_file = "feeds/data/fmri.nii.gz"
@@ -40,8 +41,10 @@
4041
workflow3d.run()
4142

4243

44+
gunzip = pe.Node(Gunzip(), name="gunzip")
45+
gunzip.inputs.in_file = os.path.abspath(in_file)
46+
4347
stc = pe.Node(interface=spm.SliceTiming(), name='stc')
44-
stc.inputs.in_files = os.path.abspath(in_file)
4548
stc.inputs.num_slices = 25
4649
stc.inputs.time_repetition = 3.0
4750
stc.inputs.time_acquisition = 2. - 2./32
@@ -63,7 +66,8 @@
6366
workflow4d = pe.Workflow(name='test_4d')
6467
workflow4d.base_dir = "/tmp"
6568

66-
workflow4d.connect([(stc, realign_estimate, [('timecorrected_files','in_files')]),
69+
workflow4d.connect([(gunzip, stc, [("out_file", "in_files")]),
70+
(stc, realign_estimate, [('timecorrected_files','in_files')]),
6771
(realign_estimate, realign_write, [('modified_in_files','in_files')]),
6872
(stc, realign_estwrite, [('timecorrected_files','in_files')]),
6973
(realign_write, smooth, [('realigned_files','in_files')])])

0 commit comments

Comments
 (0)