Skip to content

Commit b3c1b8d

Browse files
committed
FIX: Ensure 2mm template is added when running CIFTI
1 parent 6785fe0 commit b3c1b8d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

nibabies/workflows/base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -840,7 +840,7 @@ def init_workflow_spaces(execution_spaces: SpatialReferences, age_months: int):
840840
spaces.add(Reference('MNI152NLin6Asym', {'res': vol_res}))
841841
# Ensure a non-native version of MNIInfant is added as a target
842842
cohort = cohort_by_months('MNIInfant', age_months)
843-
spaces.add(Reference('MNIInfant', {'cohort': cohort}))
843+
spaces.add(Reference('MNIInfant', {'cohort': cohort, 'res': 2}))
844844

845845
return spaces
846846

@@ -955,10 +955,10 @@ def get_MNIInfant_key(spaces: SpatialReferences) -> str:
955955
key = None
956956
for space in spaces.references:
957957
# str formats as <reference.name>:<reference.spec>
958-
if 'MNIInfant' in str(space) and 'res-native' not in str(space):
958+
if 'MNIInfant' in str(space) and 'res-2' in str(space):
959959
key = str(space)
960960
break
961961

962962
if key is None:
963-
raise KeyError(f'MNIInfant not found in SpatialReferences: {spaces}')
963+
raise KeyError(f'MNIInfant (resolution 2x2x2) not found in SpatialReferences: {spaces}')
964964
return key

0 commit comments

Comments
 (0)