Interactive assistants#

Assistants open a Matplotlib window so you can pick points, boxes, rotations or labels by clicking, and hand the result straight to a correction or an analysis. They are the interactive counterpart to hand-writing pixel coordinates into a config. All derive from BaseAssistant.

Geometry#

PointSelectionAssistant

click a set of points

BoxSelectionAssistant,

drag one or more rectangles; used to collect

RectangleSelectionAssistant

colour-calibration sample windows

SubregionAssistant,

pick a region of interest, get a ready-to-paste

CropAssistant

[roi] block or a crop config

RotationCorrectionAssistant

pick two points defining “horizontal”

Labels#

LabelsAssistant is a small menu-driven editor for a segmentation label field: LabelsPickAssistant, LabelsMergeAssistant, LabelsSegmentAssistant, LabelsMaskSelectionAssistant, MonochromaticAssistant.

import darsia

samples = darsia.BoxSelectionAssistant(image)()   # returns a list of slices

These require an interactive Matplotlib backend, so they are used from scripts and the GUI, not during an unattended docs or CI build.

See also#