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] Utilities for downsampling images #17

Open
niksirbi opened this issue May 2, 2024 · 3 comments
Open

[Feature] Utilities for downsampling images #17

niksirbi opened this issue May 2, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@niksirbi
Copy link
Member

niksirbi commented May 2, 2024

Some of the imaging data is very large and of higher resolution than what we need for building an average template.
Would be useful to have utilities for cropping and for downsampling/resizing images in an efficient way.

A basic chunked downsampling by 2 (producing a pyramid of resolutions) has been implemented in the stack-to-chunk package.

Some preliminary work on more generalised resizing can be found in this branch of our stack-to-chunk fork.

We may start adding some utilities to that effect here, but if they end up being more generally useful, they may be moved to stack-to-chunk or to brainglobe-utils over time.

@niksirbi niksirbi added the enhancement New feature or request label May 2, 2024
@alessandrofelder
Copy link
Member

Downsampling addressed in #21
Cropping maybe best done in napari? Or via mask that was estimated in napari widget?

@niksirbi
Copy link
Member Author

niksirbi commented Aug 15, 2024

If we trust the brain masks we estimate, cropping can be automated by leaving a fixed margin of empty planes on each face of the mask extents. This would result in cropping if the image extends beyond the margin, and in padding where the mask touches the image edge. On one hand, having a "standard" small margin around the brain is beneficial for registration and on the other hand, it would ensure we don't carry around too many unnecessary voxels (those outside of the brain).

@alessandrofelder
Copy link
Member

Functionality for cropping implemented in #32 - can we close this @niksirbi ?

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

2 participants