dcnum.feat.queue_event_extractor ================================ .. py:module:: dcnum.feat.queue_event_extractor .. autoapi-nested-parse:: Feature Extraction: event extractor worker Attributes ---------- .. autoapisummary:: dcnum.feat.queue_event_extractor.feat_brightness dcnum.feat.queue_event_extractor.feat_contour dcnum.feat.queue_event_extractor.feat_texture Classes ------- .. autoapisummary:: dcnum.feat.queue_event_extractor.QueueEventExtractor Module Contents --------------- .. py:data:: feat_brightness .. py:data:: feat_contour .. py:data:: feat_texture .. py:class:: 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) 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. :param slot_register: Chunk slot register :type slot_register: .logic.slot_register.SlotRegister :param pixel_size: Imaging pixel size :param gate: Gating rules. :type gate: .gate.Gate :param event_queue: Queue in which the worker puts the extracted event feature data. :param extract_kwargs: Keyword arguments for the extraction process. See the keyword-only arguments in :func:`QueueEventExtractor.get_events_from_masks`. :param logger: Logger to use .. py:attribute:: slot_register Chunk slot register .. py:attribute:: pixel_size Imaging pixel size .. py:attribute:: gate Gating information .. py:attribute:: event_queue queue with event-wise feature dictionaries .. py:attribute:: logger .. py:attribute:: extract_kwargs :value: None Feature extraction keyword arguments. .. py:method:: get_events_from_masks(masks, chunk_slot, sub_index, *, brightness: bool = True, haralick: bool = True, volume: bool = True) Get events dictionary, performing event-based gating .. py:method:: get_masks_from_label(label) Get masks, performing mask-based gating .. py:method:: get_ppid() 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 .. py:method:: get_ppid_code() :classmethod: .. py:method:: get_ppid_from_ppkw(kwargs) :classmethod: Return the pipeline ID for this event extractor .. py:method:: get_ppkw_from_ppid(extr_ppid) :staticmethod: .. py:method:: process_label(index) Process one label image, extracting masks and features