Parameter tuning for images with gaps between brain regions.
I am registering mouse brain images collected under different modalities. Specifically, I am registering Light Sheet images to the Allen Brain Atlas (Common Coordinate Framework; CCF) template.
The problem I am facing is that these different imaging modalities have different levels of expansion and, as a result, have different gaps between larger structures. This is most visible at the junction of the cerebellum to the rest of the brain; there is a gap between the cerebellum and cortex in the CCF template:
That gap is not present in most light sheet images:
However, this gap is preserved when I use ANTs registration to warp the CCF template into Light Sheet space. Here, the warped CCF is shown in magenta over the Light sheet image from above, now in cyan. As you can see, the gap from the original template has been preserved even as the rest of the image fairly well registered.
.
The registration shown here is slightly complicated (its multimeric including several filters and a combination of mattes/CC), but I find this problem to hold for all the registration parameters I have tried. This includes when I have tried directly registering masks of the cortex and cerebellum from both modalities onto each other.
My question boils down to: Are there known solutions or parameter tweaks that can help minimize or eliminate this type of registration error?
Thanks in advance, and let me know if I can add other information that might help illustrate the issue.
Using larger-than-usually-sensible gradient step size for the SyN step can allow for strong warping to improve this. Reducing the SyN regularisation can also help here.
It's not a registration error in the sense that what you're asking for violates the diffeomorphic assumptions of SyN, in particular, but the smooth mapping correspondence assumption generally of all image registration algorithms. So parameter-tweaking isn't going to solve this issue.
Using larger-than-usually-sensible gradient step size for the SyN step can allow for strong warping to improve this. Reducing the SyN regularisation can also help here
It's not that the gradient step size "allows for strong warping." It just means you're taking a bigger step size during optimization.
Also, I did a bit of work recently with mapping between AllenCCFv3 and light sheet data and other modalities. The first involved the development of the DevCCF and the second involved some related technical innovations with ANTsX with an older version of the manuscript here.
If I were you, I would do something related to this particular contribution where one generates corresponding labeled regions in both AllenCCFv3 and your data and registers the images based on your regions. That way you can alter the AllenCCFv3 labels to have the gap that's present in your data.
Thanks for the pointer! We are using an approach similar to yours (generating SPIM and CCF labels) but focusing on a SPIM-template to CCF mapping so to avoid having to do the parcellation of individual brains. I like your idea of tweaking the labels in this framework. For our application, Corex mapping is typically more important than cerebellum so I might try having the cerebellum mask fill the gap to force it out of our primary ROI.
Finally, While I recognize parameter tweaking won't eliminate the issue, I am still wondering scale of the smoothness is tunable? In other words, are there parameters that could reduce the gap discrepancy down only a voxel or two?
If you have labels, I would focus on label-specific strategies such as those encapsulated in ants.label_image_registration with example usage available in our tutorial. You can then initialize a subsequent registration call with the resulting linear transform and deformable transform and reduce the regularization on the update field smoothing parameter (the default is 3.0 voxels). This would be a bit awkward using the ANTsPy interface because of its current design. But using the underlying antsRegistration, you would change the 3 in -t SyN[$gradientStep,3,0] to something smaller based on what works for your data.