Skip to content

Retain and restyle the scikit-image feature writer through core #86

Description

@uermel

Parent epic: #84

Implementation: #95, stacked on #96

Goal

Retain the public scikit-image feature API and its frozen calculation result for valid inputs while moving persistence to copick core and correcting the pre-existing trailing-overlap failure.

Compatibility contract

Keep every existing parameter, order, default, return type, and the unused copick_root argument. Append only optional keyword-only controls:

def compute_skimage_features(
    # existing parameters unchanged
    feature_chunk_size=None,
    *,
    chunks=None,
    shards=None,
): ...

Implemented scope

  • Preserve metadata-based chunk-wise input reads, scalar overlap, transpose, and edge behavior.
  • Derive bounded source-read, local-crop, and output slices independently on each axis, fixing the broadcast failure when an image ends inside trailing overlap.
  • Remove direct feature Zarr creation and codec selection.
  • Stage one feature-major float32 tensor in a temporary np.memmap rather than process memory.
  • Preserve new_features() timing and existing partial-entity failure behavior.
  • Release and remove staging after both success and failure.
  • Call CopickFeatures.from_numpy(..., dtype=np.float32, overwrite=True) once after calculation.
  • Keep feature_chunk_size as the computation size and as the storage-chunk fallback when explicit chunks is omitted.
  • Pass optional chunks and shards through core validation.

Acceptance criteria

  • Existing positional and keyword calls remain valid.
  • chunks and shards are optional keyword-only arguments.
  • Previously valid decoded output preserves the frozen digest and feature-major layout.
  • Formerly failing trailing-overlap shapes complete on all three axes without unwritten cells.
  • Peak Python memory remains below 64 MiB and below 75% of the logical 30-channel test output.
  • Staging is removed after success and final-writer failure.
  • Persistence is delegated once to core and explicit layout controls behave as documented.
  • feat: delegate feature persistence to copick #95 passes and merges after test: verify delegated canonical writers #96.

Non-goals

  • No equivalence requirement with a whole-volume scikit-image call.
  • No support guarantee beyond available temporary-disk capacity.
  • No new rollback of partially created Copick entities.
  • No broad converter or layout coverage expansion in this correction.

Metadata

Metadata

Assignees

No one assigned

    Labels

    zarr-v3-migrationMigration to OME-Zarr 0.5 and Zarr v3

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions