Description
Describe the problem
I am doing preprocessing on mice EPIs for the first time (its not going great). I have been using 'fslchpixdim' to make the voxels in the header of the EPI file to be multiplied by 10 to be a more 'human' resolution because the native EPI resolution is .156x.600x.156 and a lot of preprocessing tools I'm using will error or not work as expected with files of this native resolution. Changing the resolution of the EPIs to 1.563x6.000x1.563 seems to 'work' insofar that processing proceeds successfully until registration.
I am trying to register the mean EPI image (single 3D image) to a preprocessed T2 anatomical image. I have also changed the voxels in the header of my anatomical file from .078x.200x.078 to .781x2.00x.781 - so both the anatomical and EPI files had their voxel resolutions scaled the same. I originally used the following antsRegistration call. In this call, ${ANAT} is the 'human' sized, masked T2 and ${TS_ROI} is the 'human' sized masked EPI (both files are skullstripped/masked)
# coregister to native anatomical ----------------------------------------------
antsRegistration -v 1 \
--dimensionality 3 --float --random-seed 13311800 \
--collapse-output-transforms 1 \
--use-histogram-matching 0 \
--use-estimate-learning-rate-once 0 \
--initial-moving-transform [${ANAT},${TS_ROI},1] \
--output ${DIR_PREP}/xfm_ \
--transform "Rigid[0.1]" \
--metric Mattes[${ANAT},${TS_ROI},1,32,Regular,0.2] \
--convergence [1200x1200x100,1e-6,5] \
--smoothing-sigmas 2x1x0vox \
--shrink-factors 4x2x1
--transform "Affine[0.25]" \
--metric Mattes[${ANAT},${TS_ROI},1,32,Regular,0.2] \
--convergence [1200x1200x100,1e-6,5] \
--smoothing-sigmas 2x1x0vox \
--shrink-factors 4x2x1 \
--transform "SyN[0.2,3,0]" \
--metric Mattes[${ANAT},${TS_ROI},1,32] \
--convergence [1200x1200x100,1e-6,5] \
--smoothing-sigmas 2x1x0vox \
--shrink-factors 4x2x1
This kept erroring at the Syn step with some version of this error:
WARNING: In /Shared/pinc/sharedopt/apps/ants/Linux/x86_64/2.3.1/ITKv5-install/include/ITK-5.0/itkGaussianOperator.hxx, line 61
GaussianOperator (0x7fff1f376960): Kernel size has exceeded the specified maximum width of 6 and has been truncated to 7 elements. You can raise the maximum width using the SetMaximumKernelWidth method.
I got these parameters from someone who used to work here so I figured the parameters I was using here were not 'optimized' (or even good) for mice so I searched here and the closest I could find to my problem was issue #734
So I tried again with some parameters changed from (probably stupid) guesses I made off of reading that issue thread and I came up with this:
# coregister to native anatomical ----------------------------------------------
antsRegistration -v 1 \
--dimensionality 3 --float --random-seed 13311800 \
--collapse-output-transforms 1 \
--use-histogram-matching 0 \
--use-estimate-learning-rate-once 0 \
--initial-moving-transform [${ANAT},${TS_ROI},1] \
--output [${DIR_PREP}/xfm_ ,${DIR_PREP}/${PFX}_proc-mean_roi-brain_reg-intermodalSyn+native-noSmooth_bold.nii.gz ] \
--transform "Rigid[0.1]" \
--metric Mattes[${ANAT},${TS_ROI},1,32,Regular,0.3] \
--convergence [1000x500x100,1e-6,15] \
--smoothing-sigmas 0x0x0vox \
--shrink-factors 2x1x1 \
--transform "Affine[0.25]" \
--metric Mattes[${ANAT},${TS_ROI},1,32,Regular,0.2] \
--convergence [1000x500x100,1e-6,15] \
--smoothing-sigmas 0x0x0vox \
--shrink-factors 1x1x1 \
--transform "SyN[0.2,1,1]" \
--metric CC[${ANAT},${TS_ROI},1,2] \
--convergence [500x300x100,1e-6,15] \
--smoothing-sigmas 0x0x0vox \
--shrink-factors 1x1x1
Mostly I changed a lot of the smoothing sigmas to 0 (guessed from the kernal error) but did change shrink factors and convergence values. But to be clear, I changed them to these things based off that thread, not based on any good understanding of how these options are affecting mice data.
Now, this code ran without erroring and the results are the best I've gotten with any registration so far but they are still just, okay.
Basically at this point I'm wondering if this is the best I'm going to get with this data or if there are just some glaring errors I'm making in this code somewhere.
To Reproduce
I'll upload the ${ANAT} and ${TS_ROI} file with this post but I don't expect anyone to fix this for me; more hopefully just some recommendations.
This is the $ANAT
sub-LS101_ses-20221214T100203_roi-brain_T2w.nii.gz
This is the $TS_ROI
sub-LS101_ses-20221214T100203_dir-fwd_proc-mean_roi-brain_bold.nii.gz
The raw EPIs are not the BEST quality and have gone through the following preprocessing steps:
- reorienting to match anatomical orientation
- fslchpixdim to change pixel dimensions in header by a factor of 10
- 4D Rician Denoising
- N4 Bias Correct
- Motion Correction
- Masking
System information (please complete the following information)
I am using my work's high performance computing environment to code and run this.
It's a SGE and I run this on an HPC cluster.
ANTs version information
- ANTs code version: ANTs Version: 2.2.0
Compiled: Jul 5 2018 15:12:12 (wow, is the age an issue?) - ANTs installation type: i honestly dont feel comfortable enough even guessing
Thanks all!