Skip to content

Commit bbbb2a8

Browse files
authored
Merge pull request #1273 from effigies/fix/new_templates
FIX: Accommodate new template formats
2 parents 510f28d + 698fa3c commit bbbb2a8

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

fmriprep/__about__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
'pybids>=0.6.3',
9999
'nitime',
100100
'nipype>=1.1.1',
101-
'niworkflows>=0.4.2',
101+
'niworkflows>=0.4.3',
102102
'statsmodels',
103103
'seaborn',
104104
'indexed_gzip>=0.8.2',

fmriprep/workflows/anatomical.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@
5050
)
5151
from ..utils.misc import fix_multi_T1w_source_name, add_suffix
5252

53+
TEMPLATE_MAP = {
54+
'MNI152NLin2009cAsym': 'mni_icbm152_nlin_asym_09c',
55+
}
56+
5357

5458
# pylint: disable=R0914
5559
def init_anat_preproc_wf(skull_strip_template, output_spaces, template, debug,
@@ -330,7 +334,7 @@ def init_anat_preproc_wf(skull_strip_template, output_spaces, template, debug,
330334
)
331335

332336
if 'template' in output_spaces:
333-
template_str = nid.TEMPLATE_MAP[template]
337+
template_str = TEMPLATE_MAP[template]
334338
ref_img = op.join(nid.get_dataset(template_str), '1mm_T1.nii.gz')
335339

336340
t1_2_mni.inputs.template = template_str

fmriprep/workflows/bold/resampling.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
# See https://github.com/poldracklab/fmriprep/issues/768
3030
PatchedConcatenateLTA as ConcatenateLTA
3131
)
32+
from ..anatomical import TEMPLATE_MAP
3233

3334
from .util import init_bold_reference_wf
3435

@@ -259,7 +260,7 @@ def _aslist(in_value):
259260

260261
gen_ref = pe.Node(GenerateSamplingReference(), name='gen_ref',
261262
mem_gb=0.3) # 256x256x256 * 64 / 8 ~ 150MB)
262-
template_str = nid.TEMPLATE_MAP[template]
263+
template_str = TEMPLATE_MAP[template]
263264
gen_ref.inputs.fixed_image = op.join(nid.get_dataset(template_str), '1mm_T1.nii.gz')
264265

265266
mask_mni_tfm = pe.Node(

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
niworkflows>=0.4.2
1+
niworkflows>=0.4.3
22
versioneer

0 commit comments

Comments
 (0)