Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: Ensure correct WM and CSF masks are picked in confounds workflow #2128

Merged
merged 1 commit into from
May 21, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions fmriprep/workflows/bold/confounds.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,8 @@ def init_bold_confs_wf(
name='outputnode')

# Get masks ready in T1w space
acc_tpm = pe.Node(AddTPMs(indices=[0, 2]), name='tpms_add_csf_wm') # acc stands for aCompCor
acc_tpm = pe.Node(AddTPMs(indices=[1, 2]), # BIDS convention (WM=1, CSF=2)
name='acc_tpm') # acc stands for aCompCor
csf_roi = pe.Node(TPM2ROI(erode_mm=0, mask_erode_mm=30), name='csf_roi')
wm_roi = pe.Node(TPM2ROI(
erode_prop=0.6, mask_erode_prop=0.6**3), # 0.6 = radius; 0.6^3 = volume
Expand Down Expand Up @@ -327,10 +328,10 @@ def init_bold_confs_wf(
mem_gb=DEFAULT_MEMORY_MIN_GB)

def _pick_csf(files):
return files[0]
return files[2] # after smriprep#189, this is BIDS-compliant.

def _pick_wm(files):
return files[-1]
return files[1] # after smriprep#189, this is BIDS-compliant.

workflow.connect([
# Massage ROIs (in T1w space)
Expand Down