spacr.qt.widgets.primary_mask_selector¶
Choose a primary object class and mask source for secondary segmentation.
Primary masks load on a worker, with one queued replacement at most. A field or source change invalidates the old snapshot immediately; late results never become the source for another image. This widget reads masks and never saves.
Classes¶
Primary/secondary class selectors and an asynchronous primary-mask picker. |
Module Contents¶
- class spacr.qt.widgets.primary_mask_selector.PrimaryMaskSelector(parent=None)[source]¶
Bases:
PySide6.QtWidgets.QWidgetPrimary/secondary class selectors and an asynchronous primary-mask picker.
- Parameters:
parent – owning detection settings group.
- Variables:
snapshot – validated PrimaryMaskSource, or None while loading/invalid.
changed – emitted when the snapshot is invalidated or replaced.
Build class, file/folder and reload controls without reading a file.
- bind_field(image_path, shape, output_path)[source]¶
Invalidate the previous field and resolve this image’s primary mask.
- Parameters:
image_path – source image identifying the current queue entry.
shape – image height and width.
output_path – editable mask path, checked against source aliases.