Skip to content

Recorded Z-projection step (moved from CellPatcher) #176

Open

Description

@guijacquemet

Owner decision (2026-11-06): Z projection moves from CellPatcher to morphobricks-preprocessing as an explicit, recorded preprocessing step. CellPatcher stops combining planes (CellPatcher #86, Refs #83): it accepts z_policy max/mean/sum only as a no-op for Z=1/no-Z input and refuses real Z>1 input with ZStackNotSupportedError, pointing users here.

v0.4.0 refuses Z>1 inputs (2-D planes only in v1). This step lets a user turn a Z-stack into a 2-D image deliberately, with provenance, instead of being refused.

Scope to design (owner to confirm before implementation):

  • Where: a convert-style step that writes a recorded, harmonised Z=1 copy (same mechanism as the planned channel-subset copy), never an implicit projection at read time.
  • Methods: max, mean, sum (and whether sum needs a dtype policy: no silent overflow or clipping; refuse or widen explicitly).
  • Provenance: the source fingerprint, Z size, method, dtype handling, and the preprocessing version recorded in the output's metadata and in the run's records, so downstream bricks (CellPatcher, MorphoFeature) can see the image is a projection.
  • Masks: how masks with Z relate (projected masks are not label images; likely require 2-D masks or refuse).
  • Calibration: Z spacing is dropped explicitly and recorded; X/Y kept.
  • Downstream: MorphoFeature run folders and CellPatcher accept the projected copy as an ordinary 2-D image; the provenance is carried.

Related: the channel-subset harmonised copy shortcut (cli_convert.py, conversion_plan.py), MorphoFeature #157 (3-D strategy).

Activity

  1. added 5 commits that reference this issue on Nov 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions