spacr.qt.widgets.host_pathogen_preview¶
Interactive per-vacuole results beside the measured field’s image.
Classes¶
Preview current Host–Pathogen settings on one field without saving. |
Functions¶
|
Declare a lazily built preview using the shared Live toggle/card. |
|
Connect the preview to the form so Run preview uses current settings. |
Module Contents¶
- class spacr.qt.widgets.host_pathogen_preview.HostPathogenPreviewPanel(parent=None, *, threaded=True, settings_reader=None)[source]¶
Bases:
spacr.qt.widgets.preview_contract.LivePreviewContract,PySide6.QtWidgets.QWidgetPreview current Host–Pathogen settings on one field without saving.
Image and table selection share vacuole labels. Unknown marker states are retained; displayed infection fractions use this field’s measured hosts.
Build controls without reading images, databases or the settings form.
- Parameters:
parent – optional parent widget.
threaded – run preview work on background threads when true.
settings_reader – optional callable returning current form settings.
- apply_settings(settings)[source]¶
Replace preview settings; stale results are discarded on a change.
- Parameters:
settings – Host–Pathogen settings to copy into the preview.
- closeEvent(event)[source]¶
Cancel pending work when the panel closes.
- Parameters:
event – Qt close event forwarded to the parent implementation.
- spacr.qt.widgets.host_pathogen_preview.build_host_pathogen_preview_card(host, *, panel_later=False)[source]¶
Declare a lazily built preview using the shared Live toggle/card.
- Parameters:
host – application screen providing the current settings model.
panel_later – defer panel creation when true.
- Returns:
optional preview panel and its containing card.
- spacr.qt.widgets.host_pathogen_preview.fill_host_pathogen_preview_card(host, card)[source]¶
Connect the preview to the form so Run preview uses current settings.
- Parameters:
host – application screen providing the current settings model.
card – card whose body receives the new preview panel.
- Returns:
the attached preview panel.
Nested helpers¶
- HostPathogenPreviewPanel.run_preview.work()¶
Read available fields and analyze the captured field and plane selection off the GUI thread.
spacr/qt/widgets/host_pathogen_preview.py:204