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

Inverse transformation to transform brain images onto atlas space #134

Open
kenjp1223 opened this issue Mar 6, 2024 · 1 comment
Open

Comments

@kenjp1223
Copy link

My undestanding is that in the default approach explained in the tutorial, the atlas space is aligned to the brain space to calculate a transformation matrix.
Is there a way to apply an inverse transformation so that I can visualize how the brain aligns with the atlas?

@SaibotMagd
Copy link

SaibotMagd commented Mar 7, 2024

Hi I also tried to do this for a long long time. Short answer: clearmap uses the elastic toolbox which isn't doing a diffeomorphistic registration (https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2276735/ ). In theory it is possible to calculate the inverse afterwards and it worked sometimes but never good enough, and needs a lot of ressources (my registrations last 1 day, to calculate the inverse its at least 1 week). For visualisation purposes I found its the easiest way to do just the backward registration by hand (switch fixed and moving image) or use a toolkit which can create diffeomorphistic registration (e.g. Ants

And then use a nice performance viewer like Imaris or the 3d-viewer for Fiji (itk-snap is great but only for small images < 1GB) to overlay the registration result onto your subject tissue.

But if you really want to mark the regions onto the subject image in full resolution (e.g. if you don't want to mark the region borders by hand) you have to upscale the registered atlas annotation afterwards to the same size as the subject tissue. I never found a way to do this for high resolution images, so I build an easy tool for myself: https://github.com/SaibotMagd/3D-annotation-image-upscaler-for-huge-images as proof-of-concept. You can create regional masks out of the results and place them onto your subject tissue to create stunning images in unlimited resolution and size.

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