Specify output resolution for antsRegistration

I want to register a structural scan to my template. The resolution of my template is 40µm isotropic (see header), whereas the resolution of my structural scan is more coarse (see header). However, I don’t want my structural scan to be supersampled to 40µm - instead, I would like the resulting image to be 200µm isotropic (which is a bit higher resolved than my structural image).

If possible, I would like to avoid using a subsampled version of my template

Can I somehow specify the desired output resolution to antsRegistration?

Currently I am using an antsRegistration interface for my registration, which runs the following command line:

antsRegistration --float --collapse-output-transforms 1 --dimensionality 3 --initial-moving-transform [ /home/chymera/ni_data/templates/DSURQEc_40micron_average.nii, X8P18.nii, 1 ] --initialize-transforms-per-stage 0 --interpolation Linear --output [ output_, /home/chymera/samri_optimize/structural/4011_ofM.nii.gz ] --transform Rigid[ 1.0 ] --metric MeanSquares[ /home/chymera/ni_data/templates/DSURQEc_40micron_average.nii, X8P18.nii, 1, 16, Random, 0.3 ] --convergence [ 300x150x50, 1e-10, 20 ] --smoothing-sigmas 4.0x2.0x1.0vox --shrink-factors 3x2x1 --use-estimate-learning-rate-once 1 --use-histogram-matching 0 --transform Affine[ 1.0 ] --metric MeanSquares[ /home/chymera/ni_data/templates/DSURQEc_40micron_average.nii, X8P18.nii, 1, 16, Random, 0.3 ] --convergence [ 1500x500x250, 1e-11, 20 ] --smoothing-sigmas 4.0x2.0x1.0vox --shrink-factors 3x2x1 --use-estimate-learning-rate-once 1 --use-histogram-matching 0 --transform SyN[ 1.0, 3.0, 5.0 ] --metric Mattes[ /home/chymera/ni_data/templates/DSURQEc_40micron_average.nii, X8P18.nii, 1, 32, None, 0.3 ] --convergence [ 100x100x100, 1e-08, 20 ] --smoothing-sigmas 4.0x2.0x1.0vox --shrink-factors 3x2x1 --use-estimate-learning-rate-once 1 --use-histogram-matching 0 --winsorize-image-intensities [ 0.005, 0.98 ]  --write-composite-transform 1

But this samples the output at the template resolution.

What I would do here is do the registration to your template then use antsApplyTransforms and use a subsampled version of your template as the reference image.

1 Like

We are using this handy interface to automatically generate reference images with the right resolution https://github.com/poldracklab/fmriprep/blob/cecf99dd25a25a840673c900b3f905616bd35666/fmriprep/interfaces/images.py#L42

I can’t really tell where to specify the resolution. Can you help me out?

It’s the new_zooms vector: https://github.com/poldracklab/fmriprep/blob/cecf99dd25a25a840673c900b3f905616bd35666/fmriprep/interfaces/images.py#L244