21
21
# https://www.nipreps.org/community/licensing/
22
22
#
23
23
"""Estimate fieldmaps for :abbr:`SDC (susceptibility distortion correction)`."""
24
- import re
25
-
26
24
from nipype import logging
27
25
from nipype .pipeline import engine as pe
28
26
from nipype .interfaces import utility as niu
@@ -108,7 +106,6 @@ def init_fmap_preproc_wf(
108
106
)
109
107
110
108
for n , estimator in enumerate (estimators , 1 ):
111
- clean_bids_id = re .sub (r'[^a-zA-Z0-9]' , '' , estimator .bids_id )
112
109
est_wf = estimator .get_workflow (
113
110
omp_nthreads = omp_nthreads ,
114
111
debug = debug ,
@@ -119,15 +116,15 @@ def init_fmap_preproc_wf(
119
116
]
120
117
121
118
out_map = pe .Node (
122
- niu .IdentityInterface (fields = out_fields ), name = f"out_{ clean_bids_id } "
119
+ niu .IdentityInterface (fields = out_fields ), name = f"out_{ estimator . bids_id } "
123
120
)
124
121
out_map .inputs .fmap_id = estimator .bids_id
125
122
126
123
fmap_derivatives_wf = init_fmap_derivatives_wf (
127
124
output_dir = str (output_dir ),
128
125
write_coeff = True ,
129
126
bids_fmap_id = estimator .bids_id ,
130
- name = f"fmap_derivatives_wf_{ clean_bids_id } " ,
127
+ name = f"fmap_derivatives_wf_{ estimator . bids_id } " ,
131
128
)
132
129
fmap_derivatives_wf .inputs .inputnode .source_files = source_files
133
130
fmap_derivatives_wf .inputs .inputnode .fmap_meta = [
@@ -138,15 +135,15 @@ def init_fmap_preproc_wf(
138
135
output_dir = str (output_dir ),
139
136
fmap_type = str (estimator .method ).rpartition ("." )[- 1 ].lower (),
140
137
bids_fmap_id = estimator .bids_id ,
141
- name = f"fmap_reports_wf_{ clean_bids_id } " ,
138
+ name = f"fmap_reports_wf_{ estimator . bids_id } " ,
142
139
)
143
140
fmap_reports_wf .inputs .inputnode .source_files = source_files
144
141
145
142
if estimator .method not in (EstimatorType .MAPPED , EstimatorType .PHASEDIFF ):
146
143
fields = INPUT_FIELDS [estimator .method ]
147
144
inputnode = pe .Node (
148
145
niu .IdentityInterface (fields = fields ),
149
- name = f"in_{ clean_bids_id } " ,
146
+ name = f"in_{ estimator . bids_id } " ,
150
147
)
151
148
# fmt:off
152
149
workflow .connect ([
0 commit comments