dcnum.feat.queue_event_extractor
Feature Extraction: event extractor worker
Attributes
Classes
Event extraction from label images |
Module Contents
- dcnum.feat.queue_event_extractor.feat_brightness
- dcnum.feat.queue_event_extractor.feat_contour
- dcnum.feat.queue_event_extractor.feat_texture
- class dcnum.feat.queue_event_extractor.QueueEventExtractor(slot_register: dcnum.logic.SlotRegister, pixel_size: float, gate: dcnum.feat.gate.Gate, event_queue: multiprocessing.Queue, extract_kwargs: dict | None = None, logger: logging.Logger | None = None)[source]
Event extraction from label images
This class is used for extracting events from label images. Events are appended to the event_queue for the writer.
- Parameters:
slot_register (.logic.slot_register.SlotRegister) – Chunk slot register
pixel_size – Imaging pixel size
gate (.gate.Gate) – Gating rules.
event_queue – Queue in which the worker puts the extracted event feature data.
extract_kwargs – Keyword arguments for the extraction process. See the keyword-only arguments in
QueueEventExtractor.get_events_from_masks().logger – Logger to use
- slot_register
Chunk slot register
- pixel_size
Imaging pixel size
- gate
Gating information
- event_queue
queue with event-wise feature dictionaries
- logger
- extract_kwargs = None
Feature extraction keyword arguments.
- get_events_from_masks(masks, chunk_slot, sub_index, *, brightness: bool = True, haralick: bool = True, volume: bool = True)[source]
Get events dictionary, performing event-based gating
- get_ppid()[source]
Return a unique feature extractor pipeline identifier
The pipeline identifier is universally applicable and must be backwards-compatible (future versions of dcnum will correctly acknowledge the ID).
The feature extractor pipeline ID is defined as:
KEY:KW_APPROACH
Where KEY is e.g. “legacy”, and KW_APPROACH is a list of keyword-only arguments for get_events_from_masks, e.g.:
brightness=True^haralick=True
which may be abbreviated to:
b=1^h=1