antsApplyTransforms output is resampled to MNI grid, but qform/sform_code remains “Scanner Anat” — expected behavior?

Hi all,

I’m applying spatial normalization to fMRI data using ANTs, and I’d like to ask whether the following behavior of antsApplyTransforms is expected or if I’m missing something.

Context

  • Data were preprocessed with fMRIPrep
  • I am warping tedana-denoised BOLD data from native (boldref) space to MNI152NLin2009cAsym
  • Transforms used:
    • from-boldref_to-T1w_mode-image_desc-coreg_xfm.txt
    • from-T1w_to-MNI152NLin2009cAsym_mode-image_xfm.h5
  • Reference image:
    • *_space-MNI152NLin2009cAsym_boldref.nii.gz from fMRIPrep

Command

antsApplyTransforms \
  -d 3 -e 3 \
  -i denoised_native_bold.nii.gz \
  -r space-MNI152NLin2009cAsym_boldref.nii.gz \
  -o denoised_MNI_bold.nii.gz \
  -t from-T1w_to-MNI152NLin2009cAsym_mode-image_xfm.h5 \
  -t from-boldref_to-T1w_mode-image_desc-coreg_xfm.txt

What I observe

  • :white_check_mark: Output image has identical grid and voxel size as the MNI reference
    (dim and pixdim perfectly match)
  • :x: However, the output NIfTI header shows:
qform_name   Scanner Anat
qform_code   1
sform_name   Scanner Anat
sform_code   1

while the reference has:

qform_name   MNI_152
qform_code   4
sform_name   MNI_152
sform_code   4

Visually, the output aligns correctly with the MNI template when overlaid.

Question

Is it expected behavior that antsApplyTransforms:

  • resamples data correctly into MNI space but does not update qform/sform codes,
  • leaving them as Scanner Anat unless explicitly modified afterwards?

In other words:

  • Is it safe to treat this as a header/metadata issue only,
  • and fix it downstream (e.g., with fslcpgeom / fslorient)?

I want to be sure I’m not silently mislabeling data or misunderstanding ANTs’ handling of NIfTI headers.

Any confirmation or best-practice recommendations would be greatly appreciated.
Thanks a lot!