spacr.qt.screens.curate

Workflow inputs and outputs

Curate

Correct labels and track assignments while retaining a record of the edits.

Open: Make Masks → Curate.

Inputs and outputs below include conditional alternatives. The guidance and handoff notes say which route applies.

Inputs

  • Microscope images — Source image folder; original files, supported vendor files or imported TIFFs.

  • Label masks — masks/ when retained, or explicitly saved image/mask pairs. Intermediate masks may be removed by cleanup.

  • Linked time-series objects — Tracked labels and frame/object associations from the time-series project, with frame interval and units.

Outputs

  • Label masks — masks/ when retained, or explicitly saved image/mask pairs. Intermediate masks may be removed by cleanup.

  • Linked time-series objects — Tracked labels and frame/object associations from the time-series project, with frame interval and units.

API reference.

Module tutorial.

The Curate screen, where a mask and its tracks are corrected by hand.

A layer viewer with two panels beside it: the brush, and the track surgery. They share one screen because a track usually breaks where the mask lost the cell for a frame, so joining the track and correcting the mask at that frame are one correction.

Everything on this screen is recorded. A ledger is written beside each artefact (see spacr.curation), so a hand-edited mask can be told apart from a segmented one later.

Classes

CurateScreen

Correct a mask by hand and curate its tracks, recording every change.

Functions

make_curate_screen(→ CurateScreen)

Build the screen. The factory= for spacr.qt.app.register_app().

register(*[, section, stage, key])

Put Curate in the app registry. Idempotent.

Module Contents

class spacr.qt.screens.curate.CurateScreen(parent=None)[source]

Bases: PySide6.QtWidgets.QWidget

Correct a mask by hand and curate its tracks, recording every change.

Parameters:

parent – parent widget.

Build the curation screen and arm its drop zone.

Parameters:

parent – parent widget, or None.

attach_brush(layer, *, artifact: str = '') → spacr.qt.curation_tool.BrushPanel[source]

Put a brush panel over layer. Tests call this directly.

Parameters:

layer – the labels layer the new BrushPanel edits; any previous brush panel is stopped and removed first.

closeEvent(event) → None[source]

Stop background work and unlink before going away.

Parameters:

event – the Qt close event.

open_mask() → spacr.qt.curation_tool.BrushPanel | None[source]

Load the mask and put a brush on it. Returns the panel.

open_tracks() → bool[source]

Load a tracks CSV into the track panel.

spacr.qt.screens.curate.make_curate_screen(**_kwargs) → CurateScreen[source]

Build the screen. The factory= for spacr.qt.app.register_app().

spacr.qt.screens.curate.register(*, section: str | None = None, stage: str | None = None, key: str = APP_KEY)[source]

Put Curate in the app registry. Idempotent.

Returns:

the registry row, or None when the key was already there.