Skip to content

feat(primitives): (B,Z,Y,X) batch-shape helper (to_bzyx)#59

Open
timtreis wants to merge 1 commit into
mainfrom
feat/bzyx-shape
Open

feat(primitives): (B,Z,Y,X) batch-shape helper (to_bzyx)#59
timtreis wants to merge 1 commit into
mainfrom
feat/bzyx-shape

Conversation

@timtreis

@timtreis timtreis commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator

Foundational shared helper for the numba backends: to_bzyx(masks, pixels) normalises any input to the canonical batch-of-volumes form — 2D (H,W)(1,1,H,W), 3D volume→(1,Z,H,W), 4D or a (ragged) list→batch. Single image = batch-of-1; returns a dict for a lone image/volume, a list of dicts for a batch.

Unblocks the numba intensity (#57), granularity (#56), and zernike (#58) PRs.

Shared foundational helper used by the numba intensity/granularity/zernike
backends to normalise any input (2D/3D/4D/list) to the canonical batch-of-volumes
form: single image = batch of 1, returning a dict for a lone image/volume and a
list of dicts for a batch. Pure numpy, no numba. Extracted to its own PR so it
can be reviewed first and unblock the feature backends (#56/#57/#58).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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

Successfully merging this pull request may close these issues.

1 participant