35
35
from niworkflows .engine .workflows import LiterateWorkflow as Workflow
36
36
37
37
38
- def gen_eddy_textfiles (in_file , in_meta ):
38
+ def gen_eddy_textfiles (in_file , in_meta , newpath = None ):
39
39
"""
40
40
Generate the acquisition-parameters and index files for FSL ``eddy_openmp``.
41
41
@@ -58,10 +58,12 @@ def gen_eddy_textfiles(in_file, in_meta):
58
58
from nipype .utils .filemanip import fname_presuffix
59
59
60
60
# Generate output file name
61
+ newpath = Path (newpath or "." )
61
62
out_acqparams = fname_presuffix (
62
63
in_file ,
63
64
suffix = "_acqparams.txt" ,
64
65
use_ext = False ,
66
+ newpath = str (newpath .absolute ()),
65
67
)
66
68
67
69
pe_dir = in_meta ["PhaseEncodingDirection" ]
@@ -80,6 +82,7 @@ def gen_eddy_textfiles(in_file, in_meta):
80
82
in_file ,
81
83
suffix = "_index.txt" ,
82
84
use_ext = False ,
85
+ newpath = str (newpath .absolute ()),
83
86
)
84
87
Path (out_index ).write_text (f"{ ' ' .join (['1' ] * nb .load (in_file ).shape [3 ])} " )
85
88
return out_acqparams , out_index
@@ -102,7 +105,7 @@ def init_eddy_wf(debug=False, name="eddy_wf"):
102
105
Outputs
103
106
-------
104
107
out_eddy
105
- The eddy corrected diffusion image..
108
+ The eddy corrected diffusion image
106
109
107
110
"""
108
111
from nipype .interfaces .fsl import Eddy , ExtractROI
0 commit comments