Trouble transforming using xfm following fmriprep

Hello,

It’s my first time using antsApplyTransforms and was hoping to transform a file thats in native T1w space to a MNI152 using the following:

BASE_DIR="/path/to/bids/derivatives"
SUBJECT="sub-xyz"
HIPPO_DIR="${BASE_DIR}/hippunfold_v2/hippunfold/${SUBJECT}/anat"
FMRIPREP_DIR="${BASE_DIR}/fmriprep-20.2.7/fmriprep/${SUBJECT}/anat"

INPUT_IMAGE="${HIPPO_DIR}/${SUBJECT}_hemi-R_space-T1w_desc-subfields_atlas-bigbrain_dseg.nii.gz"
REFERENCE_IMAGE="${FMRIPREP_DIR}/${SUBJECT}_space-MNI152NLin2009cAsym_dseg.nii.gz"
OUTPUT_IMAGE="${HIPPO_DIR}/${SUBJECT}_hemi-R_space-MNI152NLin2009cAsym_desc-subfields_atlas-bigbrain_dseg.nii.gz"
TRANSFORM="${FMRIPREP_DIR}/${SUBJECT}_from-T1w_to-MNI152NLin2009cAsym_mode-image_xfm.h5"

antsApplyTransforms -d 3 -i $INPUT_IMAGE -r $REFERENCE_IMAGE -o $OUTPUT_IMAGE -t $TRANSFORM

but got…

HDF5-DIAG: Error detected in HDF5 (1.8.7) thread 0:
  #000: /home/scmcc2/tmp/antsbin/ITKv4/Modules/ThirdParty/HDF5/src/itkhdf5/src/H5D.c line 334 in H5Dopen2(): not found
    major: Dataset
    minor: Object not found
  #001: /home/scmcc2/tmp/antsbin/ITKv4/Modules/ThirdParty/HDF5/src/itkhdf5/src/H5Gloc.c line 430 in H5G_loc_find(): can't find object
    major: Symbol table
    minor: Object not found
  #002: /home/scmcc2/tmp/antsbin/ITKv4/Modules/ThirdParty/HDF5/src/itkhdf5/src/H5Gtraverse.c line 905 in H5G_traverse(): internal path traversal failed
    major: Symbol table
    minor: Object not found
  #003: /home/scmcc2/tmp/antsbin/ITKv4/Modules/ThirdParty/HDF5/src/itkhdf5/src/H5Gtraverse.c line 688 in H5G_traverse_real(): traversal operator failed
    major: Symbol table
    minor: Callback failed
  #004: /home/scmcc2/tmp/antsbin/ITKv4/Modules/ThirdParty/HDF5/src/itkhdf5/src/H5Gloc.c line 385 in H5G_loc_find_cb(): object 'TranformFixedParameters' doesn't exist
    major: Symbol table
    minor: Object not found

Am I using the wrong command?

I think it was due to version mismatch between the ANTs that fmriprep 20.2.7 LTS used and the one we had on the cluster. When using

singularity exec --bind /X:/X ‘/path/to/fmriprep_20.2.7.sif’ antsApplyTransforms -d 3 -i $INPUT_IMAGE -r $REFERENCE_IMAGE -o $OUTPUT_IMAGE -t $TRANSFORM

it worked!

1 Like