Open niksirbi opened 4 months ago
Downsampling addressed in #21
Cropping maybe best done in napari
? Or via mask that was estimated in napari
widget?
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).
Functionality for cropping implemented in #32 - can we close this @niksirbi ?
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 tobrainglobe-utils
over time.