Thank you for your help previously in getting animal_warper to run.
The results generally look great, however we are interested in mapping connections of small hippocampal subfields and so it is particularly important for our analyses that these small sub-regions (taken from the D99 atlas) are registered precisely to our native T1w’s.
I have attached an example picture below of where the results are not ideal. Do you have any recommendations for improving the alignment between our native space T1w images and the D99 atlas/ template? Is this simply a case of our image quality not allowing for better alignment, or perhaps is it best that we just go in and manually ‘correct’ the places where alignment has not worked as intended?
I have attached a QC image and an example of where I think registration hasn’t gone to plan. The two ROI’s are CA1 and Subiculum complex (created by adding all of the subiculum ROI’s together). Please let me know if it is useful to see any other images.
Many thanks in advance,
These kinds of differences are somewhat expected. Differences in the acquisition protocols make the contrasts different, but the anatomical variability is a bigger effect here, and more than the nonlinear warping can accommodate. While the overall alignment is very good in your images, you can see lots of small areas that don’t match completely. The regions transformed from the meticulously placed locations in the native space won’t end up exactly on the right locations. There are a couple things you can try though to improve the match.
- Add -nopenalty option to the nonlinear warping. That allows for more distortion, so that can allow for a better match, but it also allows for more distortion you don’t want. @animal_warper uses -extra_qw_opts to pass extra options like that to 3dQwarp to do nonlinear warping.
- Limit the alignment to the small area you want. This will probably work best as a second set of alignment.The initial affine alignment fits the overall volumes together, so local differences aren’t as important. Nonlinear warping is smooth across the whole dataset, so alignment in one part of the brain affects alignment in another part. The neighborhoods used in the nonlinear warping limit part of that interaction, so it’s not too bad of an effect, but you can work around this by just aligning a subsection of the dataset. If you start off close from a previous alignment, you should be able to align the data if there is sufficient contrast in both the template and in the subject’s image, and you have the approximate part of the template you want.
3dQwarp (the engine inside our nonlinear warping scripts) also has two options that let you give extra weight to registration in a particular small region. From the -help output of 3dQwarp:
-wball x y z r f =
Enhance automatic weight from '-useweight' by a factor
of 1+f*Gaussian(FWHM=r) centered in the base image at
DICOM coordinates (x,y,z) and with radius 'r'. The
goal of this option is to try and make the alignment
better in a specific part of the brain.
* Example: -wball 0 14 6 30 40
to emphasize the thalamic area (in MNI/Talairach space).
* The 'r' parameter must be positive (in mm)!
* The 'f' parameter must be between 1 and 100 (inclusive).
* '-wball' does nothing if you input your own weight
with the '-weight' option :(
* '-wball' does change the binary weight created by
the '-noweight' option.
* You can only use '-wball' once in a run of 3dQwarp.
*** The effect of '-wball' is not dramatic. The example
above makes the average brain image across a collection
of subjects a little sharper in the thalamic area, which
might have some small value. If you care enough about
alignment to use '-wball', then you should examine the
results from 3dQwarp for each subject, to see if the
alignments are good enough for your purposes.
-wmask ws f = Similar to '-wball', but here, you provide a dataset 'ws'
that indicates where to increase the weight.
* The 'ws' dataset must be on the same 3D grid as the base
* 'ws' is treated as a mask -- it only matters where it
is nonzero -- otherwise, the values inside are not used.
* After 'ws' comes the factor 'f' by which to increase the
automatically computed weight. Where 'ws' is nonzero,
the weighting will be multiplied by (1+f).
* As with '-wball', the factor 'f' should be between 1 and 100.
* You cannot use '-wball' and '-wmask' together!
If the region defined by -wball or -wmask is small (the usual case), the factor ‘f’ should be large-ish – 40 or more – otherwise the effect will not be noticeable. In my experiments with the human thalamus, the effects were small in any case, but visible.