Skip to content

EPI-to-anatomical alignment issue #3638

@Cynthia1229

Description

@Cynthia1229

What happened?

I observed that in both fMRIPrep 24.1.1 and 25.2.5, the alignment for some runs appears to be quite wrong. However, when I entered the Singularity environment and manually reran the exact command from the resample_mask node, the resulting output image looked correct (the white overlay in the screenshot). In contrast, the original output image generated by the node shows clear misalignment (the yellow overlay in the screenshot).

Image

What command did you use?

singularity shell --cleanenv \
  -B "${DERIVS_DIR}:/out" \
  -B "${WORK_DIR}:/work" \
  -B "${BIDS_DIR}:/data" \
  -B "${FS_DIR}:/fs" \
  -B "${FS_LICENSE}:/license" \
  "${IMG_FILE}"

antsApplyTransforms --default-value 0 --float 0 \
  --input /out/sub-165/func/sub-165_task-AssocMemStudy_dir-PA_run-03_desc-brain_mask.nii.gz \
  --interpolation MultiLabel \
  --output sub-165_task-AssocMemStudy_dir-PA_run-03_desc-brain_mask_trans.nii.gz \
  --reference-image /work/fmriprep_24_1_wf/sub_165_wf/bold_task_AssocMemStudy_run_03_dir_PA_wf/bold_anat_wf/gen_ref/sub-165_desc-preproc_T1w_reference.nii.gz \
  --transform /out/sub-165/func/sub-165_task-AssocMemStudy_dir-PA_run-03_from-boldref_to-T1w_mode-image_desc-coreg_xfm.txt

What version of fMRIPrep are you running?

24.1.1 and 25.2.5

How are you running fMRIPrep?

Singularity

Is your data BIDS valid?

Yes

Are you reusing any previously computed results?

FreeSurfer

Please copy and paste any relevant log output.

Additional information / screenshots

More details here: https://neurostars.org/t/potential-fmriprep-version-dependent-func2anat-misalignment-issue/36096

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions