|
1 | 1 | import nipype.pipeline.engine as pe |
2 | 2 | from nipype.interfaces import spm |
3 | 3 | from nipype.interfaces import fsl |
| 4 | +from nipype.algorithms.misc import Gunzip |
4 | 5 | import os |
5 | 6 |
|
6 | 7 | in_file = "feeds/data/fmri.nii.gz" |
|
40 | 41 | workflow3d.run() |
41 | 42 |
|
42 | 43 |
|
| 44 | +gunzip = pe.Node(Gunzip(), name="gunzip") |
| 45 | +gunzip.inputs.in_file = os.path.abspath(in_file) |
| 46 | + |
43 | 47 | stc = pe.Node(interface=spm.SliceTiming(), name='stc') |
44 | | -stc.inputs.in_files = os.path.abspath(in_file) |
45 | 48 | stc.inputs.num_slices = 25 |
46 | 49 | stc.inputs.time_repetition = 3.0 |
47 | 50 | stc.inputs.time_acquisition = 2. - 2./32 |
|
63 | 66 | workflow4d = pe.Workflow(name='test_4d') |
64 | 67 | workflow4d.base_dir = "/tmp" |
65 | 68 |
|
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')]), |
67 | 71 | (realign_estimate, realign_write, [('modified_in_files','in_files')]), |
68 | 72 | (stc, realign_estwrite, [('timecorrected_files','in_files')]), |
69 | 73 | (realign_write, smooth, [('realigned_files','in_files')])]) |
|
0 commit comments