6
6
7
7
from niworkflows .engine .workflows import LiterateWorkflow as Workflow
8
8
from ...interfaces import DerivativesDataSink
9
-
9
+ from sdcflows . workflows . apply . registration import init_coeff2epi_wf
10
10
11
11
def init_dwi_preproc_wf (dwi_file ):
12
12
"""
@@ -30,6 +30,7 @@ def init_dwi_preproc_wf(dwi_file):
30
30
----------
31
31
dwi_file : :obj:`os.PathLike`
32
32
One diffusion MRI dataset to be processed.
33
+ sdc : :bool:
33
34
34
35
Inputs
35
36
------
@@ -39,6 +40,10 @@ def init_dwi_preproc_wf(dwi_file):
39
40
File path of the b-vectors
40
41
in_bval
41
42
File path of the b-values
43
+ fmap_coeff
44
+ File path of the fieldmap coefficients
45
+ fmap_mask
46
+ File path of the fieldmap mask
42
47
43
48
Outputs
44
49
-------
@@ -110,6 +115,8 @@ def init_dwi_preproc_wf(dwi_file):
110
115
mem_gb = config .DEFAULT_MEMORY_MIN_GB , omp_nthreads = config .nipype .omp_nthreads
111
116
)
112
117
118
+ coeff2epi_wf = init_coeff2epi_wf (omp_nthreads = config .nipype .omp_nthreads , write_coeff = True )
119
+
113
120
# MAIN WORKFLOW STRUCTURE
114
121
# fmt:off
115
122
workflow .connect ([
@@ -118,9 +125,12 @@ def init_dwi_preproc_wf(dwi_file):
118
125
("in_bval" , "in_bval" )]),
119
126
(inputnode , dwi_reference_wf , [("dwi_file" , "inputnode.dwi_file" )]),
120
127
(gradient_table , dwi_reference_wf , [("b0_ixs" , "inputnode.b0_ixs" )]),
121
- (dwi_reference_wf , outputnode , [
122
- ("outputnode.ref_image" , "dwi_reference" ),
123
- ("outputnode.dwi_mask" , "dwi_mask" ),
128
+ (dwi_reference_wf , coeff2epi_wf , [
129
+ ("outputnode.ref_image" , "target_ref" ),
130
+ ("outputnode.dwi_mask" , "target_mask" ),
131
+ #outputnode, [
132
+ # ("outputnode.ref_image", "dwi_reference"),
133
+ # ("outputnode.dwi_mask", "dwi_mask"),
124
134
]),
125
135
(gradient_table , outputnode , [("out_rasb" , "gradients_rasb" )]),
126
136
])
0 commit comments