dcnum.segm.segmenter_manager_thread
Classes
Manage the segmentation of image data |
Module Contents
- class dcnum.segm.segmenter_manager_thread.SegmenterManagerThread(segmenter: dcnum.segm.segmenter.Segmenter, slot_register: dcnum.logic.SlotRegister, *args, **kwargs)[source]
Bases:
threading.ThreadManage the segmentation of image data
- Parameters:
segmenter – The segmenter instance to use.
slot_register – Manages a list of ChunkSlots, shared arrays on which to operate
Notes
The working principle of this SegmenterManagerThread allows the user to define a fixed number of slots on which the segmenter can work on. For instance, if the segmenter is a CPU-based segmenter, it does not make sense to have more than one slot (because feature extraction should not take place at the same time). But if the segmenter is a GPU-based segmenter, then it makes sense to have more than one slot, so CPU and GPU can work in parallel.
- logger
- segmenter
Segmenter instance
- slot_register
Slot manager
- t_segm = 0
Segmentation time counter
- t_wait = 0
Waiting time counter
- run()[source]
Method representing the thread’s activity.
You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.