Skip to content

Feature: declare image-plane selection and explicit T/Z axis handling #56

Open

Description

@guijacquemet

Purpose

Allow a 2D microscopy tool to run on a selected plane of a Z-stack or time-lapse, and allow stack-aware tools to declare the axes they actually need, without ambiguously treating TYX, ZYX and CYX as equivalent 3D arrays.

Current Axes("YX") mostly constrains dimensionality, while PickChannel() selects acquisition channels. Fiji, Napari and QuPath each expose image planes differently. A tool should declare its scientific requirements once; each host should offer the relevant plane/channel controls.

This is feature work, not a claim that a tool is broken. See the earlier unmerged Wave 2 specification PR #39, which already explores Axes("TZYX"), TimeIntervalOf, ZStepOf, and PerPlane. Reuse and critically review that design rather than write a second incompatible specification.

Proposed behavior

  • Keep existing 2D and no-Axes tools backward compatible.
  • Allow declarations for common T/Z/C/Y/X arrangements with correct axis identities and order, not just ndim.
  • Where a 2D image is requested from a stack, present an explicit user-selected plane, or use the host's current plane with visible provenance; never silently assume a projection.
  • Distinguish selecting one plane from running an algorithm independently on all planes; automated PerPlane execution needs separate opt-in, progress, cancel, merging rules, and clear error handling.
  • Standardize how the selected plane and channel are recorded with each run, including behavior for missing metadata.
  • Follow physical calibration rules, including Z-step and time interval, as part of the same schema evolution.

Acceptance criteria

  1. A single TYX image never silently becomes a ZYX input solely due to matching shape.
  2. The same 2D tool receives the expected pixels when selecting a specific T/Z plane in Fiji, Napari and QuPath.
  3. A whole-stack tool receives arrays in declared axis order, or a clear validation error.
  4. The selection is recorded for reproducibility and restored appropriately when results are displayed.
  5. Tests cover single-image YX, ZYX, TYX, TZYX, channels, missing axis metadata, and current-plane changes during long runs.
  6. CLI and notebook behavior is documented; no implicit GUI-only changes to scientific results.

Priority: High; feature proposal. Source context: manifest, Wave 2 PR #39.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions