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

[Feature] Mask registration target by annotation extents #77

Open
alessandrofelder opened this issue Feb 6, 2025 · 2 comments
Open
Labels
enhancement New feature or request

Comments

@alessandrofelder
Copy link
Member

Is your feature request related to a problem? Please describe.
Looking at many template images (especially MRI of developing mice) recently: many include tissue around the brain too. This makes them potentially bad registration targets.

Describe the solution you'd like
A nice UI to tell brainglobe-registration to register only to pixels where the atlas annotation > 0, maybe?

@alessandrofelder alessandrofelder added the enhancement New feature or request label Feb 6, 2025
@kjungwoo5
Copy link

I am happy to work on this, @IgorTatarnikov do you have any advice on how to proceed? @alessandrofelder and I have discussed it a little bit, and we thought it would make sense to approach it by passing the BG atlas in elastix rather than just the atlas image itself, and then running code to mask the registration target using the annotation image as a reference.

@IgorTatarnikov
Copy link
Member

Sounds good! The UI and python API are very tightly integrated at this point and could do with a refactor at some point so a lot of the logic is currently embedded in the napari widget.

As it stands right now, the napari widget holds a BG atlas object and is aware of the annotations and reference. I think the easiest way of approaching this would be to create a binary mask using the annotation image (for the chosen region in 2D for now), then apply this mask to the reference image before passing it to elastix.

I'm imaging it goes somewhere here. Just before the images are filtered, we would pre-process the reference image to set anything outside of the annotations to 0. This should be exposed as maybe a tick box in the UI.

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

No branches or pull requests

3 participants