2
2
from pathlib import Path
3
3
4
4
5
- def init_workflow (bold_file , bold_roi , bold_atlas_roi , atlas_xfm , TR = None ):
5
+ def init_workflow (bold_file , bold_roi , bold_atlas_roi , atlas_xfm , vol_sigma ):
6
6
from nibabies .workflows .bold .alignment import init_subcortical_mni_alignment_wf
7
7
8
- if TR is None :
9
- # guess TR from header
10
- import nibabel as nb
11
- img = nb .load (bold_file )
12
- assert len (img .shape ) > 3 , "Not a 4D file"
13
- TR = img .header ['pixdim' ][4 ]
14
-
15
- wf = init_subcortical_mni_alignment_wf (repetition_time = TR )
8
+ wf = init_subcortical_mni_alignment_wf (vol_sigma = vol_sigma )
16
9
wf .inputs .inputnode .bold_file = bold_file
17
10
wf .inputs .inputnode .bold_roi = bold_roi
18
11
wf .inputs .inputnode .atlas_roi = bold_atlas_roi
@@ -50,9 +43,10 @@ def init_workflow(bold_file, bold_roi, bold_atlas_roi, atlas_xfm, TR=None):
50
43
help = "transformation of input BOLD file to MNI space" ,
51
44
)
52
45
parser .add_argument (
53
- "--tr " ,
46
+ "--vol-sigma " ,
54
47
type = float ,
55
- help = "BOLD repetition time. If not provided, NIfTI header information is used" ,
48
+ default = 0.8 ,
49
+ help = "The sigma for the gaussian volume smoothing kernel, in mm" ,
56
50
)
57
51
parser .add_argument (
58
52
"--nipype-plugin" ,
@@ -65,7 +59,7 @@ def init_workflow(bold_file, bold_roi, bold_atlas_roi, atlas_xfm, TR=None):
65
59
opts .bold_roi .absolute (),
66
60
opts .bold_atlas_roi .absolute (),
67
61
opts .atlas_xfm .absolute (),
68
- TR = opts .tr ,
62
+ vol_sigma = opts .vol_sigma ,
69
63
)
70
64
71
65
wf .config ['execution' ]['crashfile_format' ] = 'txt'
0 commit comments