Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestions for accommodating larger deformations during atlas building #1621

Open
muratmaga opened this issue Nov 7, 2023 · 3 comments
Open

Comments

@muratmaga
Copy link

We are trying to build an template from ~35 mid-gestation mouse fetuses. modality is microCT (with iodine contrast). Some fetuses at this stage may have a torsion of the head with respect to the axis of body (see the screenshot), or have tilt of the head with respect to the body.
image

This results in less than ideal registration as seen by samples in atlas space.

image

This results in a lot of ghosts in the atlas (middle image)

I appreciate if anyone can suggests improving the registration. Eventually (i.e., during the actual statistical analysis) we will have the same problems registering individual samples to the atlas we derived, since this is a naturally occurring variation (the angle of the head tilt changes with the gestational maturity of the fetus. Earlier ones are more tucked in towards the body , and later have a wider angle. Unfortunately this is not a factor we can experimentally control. There is always about +/- 12h uncertainty in litters).

This is the call to the aMTC2.sh

antsMultivariateTemplateConstruction2.sh -d 3 -i 2 -c 1  -n 0 -k 1 -f 6x4x2x1 -s 4x2x1x0vox -q 300x100x70x20 -p "export ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS=48"  -t SyN -m CC -z /home/maga/TxImgs18um/ref/average.nii  -o test *.nrrd
@gdevenyi
Copy link
Contributor

gdevenyi commented Nov 7, 2023

We had exactly this issue with MRI of exvivo neonatal mice.

In the end we had to manually pre-register the most deformed subjects with thin plate splines and control points before we could successfully get convergence without any misaligned subjects. We also had to mask away the tail because trying to align it results to it detrementally impacting body registration.

You may also try https://github.com/CoBrALab/optimized_antsMultivariateTemplateConstruction which defaults to a more extensive image pyramid for registration which may computationally solve your issue, depending on how bad the initial alignment problems are.

@muratmaga
Copy link
Author

@gdevenyi thank you. Glad to hear that we are not alone :) It is hard to work with small, squishy things.

So if I understood you correctly, you manually deformed each sample using landmarks and TPS, and used that warped image in atlas building? Does that also mean for jacobian or other statistical analyses you also do the same for all the samples?

@gdevenyi
Copy link
Contributor

gdevenyi commented Nov 7, 2023

So if I understood you correctly, you manually deformed each sample using landmarks and TPS, and used that warped image in atlas building?

Correct

Does that also mean for jacobian or other statistical analyses you also do the same for all the samples?

Not all samples needed it, so it was not done to all of them.

A few options here that we examined:

  1. Compute the jacobians from the TPS transform and add that into the subject values after the fact
  2. Ignore the deformations, as they were large bulk shape changes and our areas of interest were internal tissues and brain which were not appreciably affected by the TPS

After examining the Jacobians from 1 we decided to ignore them, as we typically focus on local-deformations where we also discard the affine Jacobian and any residual affine volume change arising from bulk deformations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants