neu_vol.ops.align

The block grid a box should be aligned to, from a volume’s own chunking and pyramid.

Attributes

Functions

align_grid(described, volume, *[, level, to]) → tuple[tuple[int, ...], str]

(block in level-0 voxels, where it came from) for one of GRIDS.

Module Contents

neu_vol.ops.align.align_grid(described: Mapping[str, Any], volume: str, *, level: int = 0, to: str = 'write-unit') → tuple[tuple[int, ...], str]

(block in level-0 voxels, where it came from) for one of GRIDS.

described is neu_vol.describe()’s output for volume. write-unit is the level’s chunk, or its shard where sharded (the object a partial write rewrites); read-chunk the inner chunk; pyramid the deepest level’s cumulative factor, the grid every level shares; both the LCM of the write unit and that factor. Raises ValueError if the volume does not report what the grid needs.

neu_vol.ops.align.GRIDS = ('write-unit', 'read-chunk', 'pyramid', 'both')