Harvester API Reference¶
-
class
harvesters.core.Buffer(*, module: genicam.gentl.Buffer, node_map: Optional[genicam.genapi.NodeMap] = None, acquire: Optional[harvesters.core.ImageAcquirer] = None)¶ Bases:
harvesters.core.ModuleIs provided by an
ImageAcquireobject when you call itsfetch()method. It provides you a way to access acquired data and its relevant information.Note that it will never be necessary to create this object by yourself in general.
-
__init__(*, module: genicam.gentl.Buffer, node_map: Optional[genicam.genapi.NodeMap] = None, acquire: Optional[harvesters.core.ImageAcquirer] = None)¶ Parameters: - module (_Buffer) – Set a GenTL Buffer object to be wrapped.
- node_map (NodeMap) – Set a node map which blongs to the owner remote device.
Raises: genicam.gentl.GenericException– If the buffer contains unusable information.
-
module¶ The corresponding GenTL module.
Type: Union[System, Interface, Device, RemoteDevice, DataStream, Buffer]
-
node_map¶ The GenICam feature node map that belongs to the owner object.
Type: NodeMap
-
parent¶ The parent raw GenTL module.
Type: Union[None, System, Interface, Device, RemoteDevice, DataStream]
-
queue()¶ Queues the buffer to prepare for the upcoming image acquisition. Once the buffer is queued, the
Bufferobject will be obsolete. You’ll have nothing to do with it.Note that you have to return _the ownership of the fetched buffers to the
ImageAcquirerobject before stopping image acquisition calling this method because theImageAcquirerobject tries to clear the self-allocated buffers when it stops image acquisition.
-
-
class
harvesters.core.Callback¶ Bases:
objectIs used as a base class to implement user defined callback behavior.
-
__init__¶ Initialize self. See help(type(self)) for accurate signature.
-
emit(context: Optional[object] = None) → None¶ Is called when a specific condition is met.
This method is abstract and should be reimplemented in any sub-class.
-
-
class
harvesters.core.Component(*, buffer=None)¶ Bases:
objectIs a base class of various data component types.
-
__init__(*, buffer=None)¶ Parameters: buffer –
-
data_format_namespace¶ The data type namespace of the data component.
Type: PIXELFORMAT_NAMESPACE_IDS
-
-
class
harvesters.core.Component2DImage(*, buffer=None, part=None, node_map: Optional[genicam.genapi.NodeMap] = None)¶ Bases:
harvesters.core.ComponentRepresents a data component that is classified as
PART_DATATYPE_2D_IMAGEby the GenTL Standard.-
__init__(*, buffer=None, part=None, node_map: Optional[genicam.genapi.NodeMap] = None)¶ Parameters: - buffer –
- part –
- node_map –
-
data_format_namespace¶ The data type namespace of the data component.
Type: PIXELFORMAT_NAMESPACE_IDS
-
represent_pixel_location() → Optional[numpy.ndarray]¶ Returns a NumPy array that represents the 2D pixel location, which is defined by PFNC, of the original image data.
You may use the returned NumPy array for a calculation to map the original image to another format.
Returns: A NumPy array that represents the 2D pixel location. Return type: Union[numpy.ndarray, None]
-
x_offset¶ The X offset of the data in the buffer in number of pixels from the image origin to handle areas of interest.
Type: int
-
-
class
harvesters.core.ComponentBase(*, buffer=None)¶ Bases:
harvesters.core.ComponentAttention
It has been deprecated at 1.3.7 and will be removed in 2.0.0. It will be replaced by
Component.-
__init__(*, buffer=None)¶ Parameters: buffer –
-
data_format_namespace¶ The data type namespace of the data component.
Type: PIXELFORMAT_NAMESPACE_IDS
-
-
class
harvesters.core.ComponentUnknown¶ Bases:
harvesters.core.ComponentRepresents a data component that is classified as
PART_DATATYPE_UNKNOWNby the GenTL Standard.-
__init__()¶ Parameters: buffer –
-
data_format_namespace¶ The data type namespace of the data component.
Type: PIXELFORMAT_NAMESPACE_IDS
-
-
class
harvesters.core.DataStream(*, module: genicam.gentl.DataStream, parent=None)¶ Bases:
harvesters.core.ModuleRepresents a GenTL Data Stream module.
-
__init__(*, module: genicam.gentl.DataStream, parent=None)¶ Initialize self. See help(type(self)) for accurate signature.
-
module¶ The corresponding GenTL module.
Type: Union[System, Interface, Device, RemoteDevice, DataStream, Buffer]
-
node_map¶ The GenICam feature node map that belongs to the owner object.
Type: NodeMap
-
parent¶ The parent raw GenTL module.
Type: Union[None, System, Interface, Device, RemoteDevice, DataStream]
-
-
class
harvesters.core.Device(*, module: genicam.gentl.Device, parent=None)¶ Bases:
harvesters.core.ModuleRepresents a GenTL Device module that is a proxy of a remote device.
-
__init__(*, module: genicam.gentl.Device, parent=None)¶ Initialize self. See help(type(self)) for accurate signature.
-
module¶ The corresponding GenTL module.
Type: Union[System, Interface, Device, RemoteDevice, DataStream, Buffer]
-
node_map¶ The GenICam feature node map that belongs to the owner object.
Type: NodeMap
-
parent¶ The parent raw GenTL module.
Type: Union[None, System, Interface, Device, RemoteDevice, DataStream]
-
-
class
harvesters.core.Harvester(*, profile=False, logger: Optional[logging.Logger] = None, do_clean_up: bool = True, config: Optional[harvesters.core.ParameterSet] = None)¶ Bases:
objectIs the class that works for you as Harvester Core. Everything begins with this class.
-
__init__(*, profile=False, logger: Optional[logging.Logger] = None, do_clean_up: bool = True, config: Optional[harvesters.core.ParameterSet] = None)¶ Parameters: - profile (bool=False) – Deprecated: will be removed at 2.0.0. Use
configinstead. This feature is for development purpose. Please do not setTrueif you are not a Harvester developer. - logger (Optional[Logger] = None) – Deprecated: will be removed at 2.0.0. Use
configinstead. Set a logger object that you want to bind with the Harevester and its accompanying obects. Ifconfigis set then this parameter will be ignored. - do_clean_up (bool=True) – Deprecated: will be removed at 2.0.0. Use
configinstead. This feature is for development purpose. Please do not setFalseif you are not a Harvester developer. - config (Optional[ParameterSet] = None) –
Set a parameter set. Possible parameters are:
Logger,EnableCleaningUpIntermediateFiles, andTimeOutPeriodOnModuleEnumeration.
- profile (bool=False) – Deprecated: will be removed at 2.0.0. Use
-
add_cti_file(file_path: str, check_existence: bool = False, check_validity: bool = False)¶ Attention
It has been deprecated at 1.3.7 and will be removed at 2.0.0. It will be replaced by
add_file().
-
add_file(file_path: str, check_existence: bool = False, check_validity: bool = False) → None¶ Adds a CTI file as one of GenTL Producers to work with.
Parameters: Raises: FileNotFoundError– If the specified file does not exist and check_existence is True.OSError– If the specified file is not valid and check_validity is True.
-
create(search_key: Union[int, Dict[str, str], harvesters.core.DeviceInfo, None] = None, *, config: Optional[harvesters.core.ParameterSet] = None) → harvesters.core.ImageAcquirer¶ Creates an image acquirer that is mapped to the specified remote device.
Parameters: - search_key (Optional[Union[int, Dict[str, str], DeviceInfo]] = None) – Set either an list index (int), a dictionary that specifies device information properties (Dict[str, str]), or a device information object (DeviceInfo) to specify a target device to be mapped to the ImageAcquirer object to be created.
- config (Optional[ParameterSet] = None) –
Set a parameter set. Possible parameters are:
EnableCleaningUpIntermediateFiles,EnableAutoChunkDataUpdate,RemoveDeviceSourceXmlPath,ThreadSleepPeriod,TimeOutPeriodOnUpdateEventDataCall,TimeOutPeriodOnFetchCall, andNumBuffersOnGenTLProducer.
Returns: An ImageAcquire object that is mapped to the specified remote device.
Return type: Attention
Note that you need to explicitly destroy the object to ensure that the mapped device ownership is released.
-
create_image_acquirer(list_index: Optional[int] = None, *, id_: Optional[str] = None, vendor: Optional[str] = None, model: Optional[str] = None, tl_type: Optional[str] = None, user_defined_name: Optional[str] = None, serial_number: Optional[str] = None, version: Optional[str] = None, sleep_duration: Optional[float] = 1e-06, file_path: Optional[str] = None, privilege: str = 'exclusive', file_dict: Optional[Dict[str, bytes]] = None, auto_chunk_data_update=True)¶ Attention
It has been deprecated at 1.3.7 and will be removed at 2.0.0. It will be replaced by
create().Creates an image acquirer for the specified remote device and return the created
ImageAcquirerobject.Parameters: - list_index – Set an item index of the list of
DeviceInfoobjects. - id – Set an index of the device information list.
- vendor – Set a vendor name of the target device.
- model – Set a model name of the target device.
- tl_type – Set a transport layer type of the target device.
- user_defined_name – Set a user defined name string of the target device.
- serial_number – Set a serial number string of the target device.
- version – Set a version number string of the target device.
- sleep_duration – Set a sleep duration in second that is inserted after the image acquisition worker is executed.
- file_path – Set a path to camera description file which you want to load on the target node map instead of the one which the device declares.
- privilege – Set an access privilege.
exclusive,control, andread_onlyare supported. The default isexclusive.
Returns: An
ImageAcquirerobject that associates with the specified device.- list_index – Set an item index of the list of
-
cti_files¶ Attention
It has been deprecated at 1.3.7 and will be removed at 2.0.0. It will be replaced by
files.
-
device_info_list¶ A list of available device information.
Type: List[DeviceInfo]
-
image_acquirers¶ The image acquirer objects that belong to the harvester object.
Type: List[ImageAcquirer]
-
remove_cti_file(file_path: str)¶ Attention
It has been deprecated at 1.3.7 and will be removed at 2.0.0. It will be replaced by
remove_file().
-
remove_cti_files() → None¶ Attention
It has been deprecated at 1.3.7 and will be removed at 2.0.0. It will be replaced by
remove_files().
-
remove_file(file_path: str) → None¶ Removes the specified CTI file on the list.
Parameters: file_path (str) – Set a file path to the target CTI file.
-
remove_files() → None¶ Removes all CTI files on the list.
-
reset() → None¶ Resets the Harvester object to the initial state.
-
timeout_for_update¶ The duration that is used as the time limit for the device enumeration process. The unit is [ms].
Type: int
-
update() → None¶ Updates the list that holds available devices. You’ll have to call this method every time you added CTI files or plugged/unplugged devices.
Please note that the update method call will eventually turn the existing ImageAcquire objects immediately obsolete even if the object is still owned by someone. The owner should drop those obsolete objects and create another ImageAcquisition object by calling the Harvester.create_image_acquire method.
-
-
class
harvesters.core.ImageAcquirer(*, parent: harvesters.core.Harvester, device_proxy=None, config: Optional[harvesters.core.ParameterSet] = None, profiler=None, file_dict=None)¶ Bases:
objectManages everything you need to acquire images from the connecting device.
-
class
Events¶ Bases:
enum.IntEnumPossible events that the
ImageAcquirerclass can notify to the client.
-
__init__(*, parent: harvesters.core.Harvester, device_proxy=None, config: Optional[harvesters.core.ParameterSet] = None, profiler=None, file_dict=None)¶ Parameters: - device_proxy (Device_) –
- sleep_duration (float) –
- file_path (str) – Set a path to camera description file which you want to load on the target node map instead of the one which the device declares.
- update_chunk_automatically (bool) – Set
Trueif you want to let the chunk data being updated when a buffer is newly fetched.Falsemeans you will explicitly update the chunk data by yourself when needed. - file_dict (Dict[str, bytes]) –
-
data_streams¶ A list of GenTL
DataStreamobjects that theImageAcquireobject is working with.Type: List[DataStream]
-
destroy() → None¶ Destroys itself; releases all preserved external resources such as buffers or the connected remote device.
Note that once the destroy method is called on the object then the object will immediately turn obsolete and there will never be any way to make the object usable. Just throw the object away and create another object by calling
Harvester.create_image_acquire()method.
-
device¶ The local GenTL
Deviceproxy object that theImageAcquireobject is working with.Type: Device
-
fetch(*, timeout: float = 0, is_raw: bool = False, cycle_s: Optional[float] = None) → Union[harvesters.core.Buffer, genicam.gentl.Buffer, None]¶ Fetches an available
Bufferobject that has been filled up with a single image and returns it.Parameters: - timeout (float) – Set the period that defines the expiration for an available buffer delivery; if no buffer is fetched within the period then TimeoutException will be raised. The unit is [s].
- is_raw (bool) – Set
Trueif you need a raw GenTL Buffer module; note that you’ll have to manipulate the object by yourself. - cycle_s (float) – Set the cycle that defines how frequently check if a buffer is available. The unit is [s].
Returns: A buffer object if the resource is complete; otherwise None.
Return type:
-
fetch_buffer(*, timeout: float = 0, is_raw: bool = False, cycle_s: Optional[float] = None) → harvesters.core.Buffer¶ Attention
It has been deprecated at 1.3.6 and will be removed at 2.0.0. It will be replaced by
fetch().
-
is_acquiring() → bool¶ Returns the truth value of a proposition: It’s acquiring images.
Returns: Trueif it’s acquiring images. OtherwiseFalse.Return type: bool
-
is_acquiring_images()¶ Attention
It has been deprecated at 1.3.7 and will be removed in 2.0.0. It will be replaced by
is_acquiring().
-
is_armed() → bool¶ Returns the arm status on image acquisition.
Returns: Trueif it’s been armed for image acquisition; otherwise,False.
-
is_valid() → bool¶ bool: Returns
Falseand it means the object has been obsolete and there is nothing to do for you. Just leave the object and start working with another newly created object.The
Harvester.update()method call on its parentHarvesterobject make its owningImageAcquirerobjects obsolete as the available device information is completely reconstructed.
-
min_num_buffers¶ The minimum number of the buffers for image acquisition. You have to set a value to
num_buffers()so that is greater than or equal to this.Type: int
-
num_buffers¶ The number of buffers that is prepared for the image acquisition process. The buffers will be announced to the target GenTL Producer.
Type: int
-
num_filled_buffers_to_hold¶ The number of buffers that is used for a case where the image acquisition process runs in the background. You will fetch buffers from the buffers when you call the
fetch()method in a case you started the image acquisition passingTruetorun_as_threadof thestart()method.Type: int
-
num_holding_filled_buffers¶ The number of available buffers, i.e., the buffers that contain images.
Type: int
-
remote_device¶ The remote GenTL
Deviceobject, typically a camera, that theImageAcquireobject is working with.Type: RemoteDevice
-
start(*, run_as_thread: bool = False) → None¶ Starts image acquisition process.
Parameters: run_as_thread (bool) – Set Trueif you want to let the ImageAcquire object keep acquiring images in the background and the images you get callingfetch()method will be from theImageAcquirer. Otherwise, the images will directly come from the target GenTL Producer.
-
start_acquisition(run_in_background: bool = False) → None¶ Attention
It has been deprecated at 1.3.7 and will be removed at 2.0.0. It will be replaced by
start().
-
start_image_acquisition(run_in_background=False)¶ Attention
It has been deprecated at 1.3.6 and will be removed at 2.0.0. It will be replaced by
start().
-
statistics¶ The statistics about image acquisition.
Type: Statistics
-
stop() → None¶ Stops image acquisition process.
-
stop_acquisition() → None¶ Attention
It has been deprecated at 1.3.7 and will be removed at 2.0.0. It will be replaced by
stop().
-
stop_image_acquisition()¶ Attention
It has been deprecated at 1.3.7 and will be removed at 2.0.0. It will be replaced by
stop().
-
thread_image_acquisition¶ Attention
It has been deprecated at 1.3.6 and will be removed in 2.0.0.
-
timeout_for_image_acquisition¶ Attention
It has been deprecated at 1.3.6 and will be removed in 2.0.0. It will be replaced by
timeout_period_on_update_event_data_call.
-
timeout_on_client_fetch_call¶ Attention
It has been deprecated at 1.3.6 and will be removed in 2.0.0. It will be replaced by
timeout_period_on_client_fetch_call.
-
timeout_period_on_client_fetch_call¶ It is used to define the timeout duration on a single fetch method calL. The unit is [s].
Type: float
-
timeout_period_on_update_event_data_call¶ It is used to define the timeout duration on an internal single GenTL fetch calL. The unit is [ms].
Type: int
-
try_fetch(*, timeout: float, is_raw: bool = False) → Union[harvesters.core.Buffer, genicam.gentl.Buffer, None]¶ Unlike the fetch method, the try_fetch method gives up and returns None if no complete buffer was acquired during the defined period.
Parameters: - timeout (float) – Set the period that defines the expiration for an available buffer delivery; if no buffer is fetched within the period then None will be returned. The unit is [s].
- is_raw (bool) – Set
Trueif you need a raw GenTL Buffer module; note that you’ll have to manipulate the object by yourself.
Returns: A buffer if it is complete; otherwise None.
Return type:
-
class
-
class
harvesters.core.Interface(*, module: genicam.gentl.Interface, parent=None)¶ Bases:
harvesters.core.ModuleRepresents a GenTL Interface module.
-
__init__(*, module: genicam.gentl.Interface, parent=None)¶ Initialize self. See help(type(self)) for accurate signature.
-
module¶ The corresponding GenTL module.
Type: Union[System, Interface, Device, RemoteDevice, DataStream, Buffer]
-
node_map¶ The GenICam feature node map that belongs to the owner object.
Type: NodeMap
-
parent¶ The parent raw GenTL module.
Type: Union[None, System, Interface, Device, RemoteDevice, DataStream]
-
-
class
harvesters.core.ParameterKey¶ Bases:
enum.IntEnumA list of variable/defined parameters.
-
class
harvesters.core.ParameterSet(parameter_dict: Optional[Dict[harvesters.core.ParameterKey, Any]] = None)¶ Bases:
objectA set of parameters. A typical use case is to use the parameter set to configure a subject.
-
__init__(parameter_dict: Optional[Dict[harvesters.core.ParameterKey, Any]] = None)¶ Parameters: parameter_dict (Optional[Dict[ParameterKey, Any]] = None):) – A parameter dictionary. You can add or remove an arbitrary key after the instantiation.
-
-
class
harvesters.core.Payload(*, buffer: harvesters.core.Buffer)¶ Bases:
objectIs a base class of various payload types. The types are defined by the GenTL Standard. In general, you should not have to design a class that derives from this base class.
-
__init__(*, buffer: harvesters.core.Buffer)¶ Parameters: buffer –
-
payload_type¶ The type of the payload.
Type: PAYLOADTYPE_INFO_IDS
-
-
class
harvesters.core.PayloadBase(*, buffer: harvesters.core.Buffer)¶ Bases:
harvesters.core.PayloadAttention
It has been deprecated at 1.3.7 and will be removed in 2.0.0. It will be replaced by
Payload.-
__init__(*, buffer: harvesters.core.Buffer)¶ Parameters: buffer –
-
payload_type¶ The type of the payload.
Type: PAYLOADTYPE_INFO_IDS
-
-
class
harvesters.core.PayloadChunkOnly(*, buffer: genicam.gentl.Buffer)¶ Bases:
harvesters.core.PayloadRepresents a payload that is classified as
genicam.gentl.PAYLOADTYPE_INFO_IDS.PAYLOAD_TYPE_CHUNK_ONLYby the GenTL Standard.-
__init__(*, buffer: genicam.gentl.Buffer)¶ Parameters: buffer –
-
payload_type¶ The type of the payload.
Type: PAYLOADTYPE_INFO_IDS
-
-
class
harvesters.core.PayloadFile(*, buffer: genicam.gentl.Buffer)¶ Bases:
harvesters.core.PayloadRepresents a payload that is classified as
genicam.gentl.PAYLOADTYPE_INFO_IDS.PAYLOAD_TYPE_FILEby the GenTL Standard.-
__init__(*, buffer: genicam.gentl.Buffer)¶ Parameters: buffer –
-
payload_type¶ The type of the payload.
Type: PAYLOADTYPE_INFO_IDS
-
-
class
harvesters.core.PayloadH264(*, buffer: genicam.gentl.Buffer)¶ Bases:
harvesters.core.PayloadRepresents a payload that is classified as
genicam.gentl.PAYLOADTYPE_INFO_IDS.PAYLOAD_TYPE_H264by the GenTL Standard.-
__init__(*, buffer: genicam.gentl.Buffer)¶ Parameters: buffer –
-
payload_type¶ The type of the payload.
Type: PAYLOADTYPE_INFO_IDS
-
-
class
harvesters.core.PayloadImage(*, buffer: genicam.gentl.Buffer, node_map: Optional[genicam.genapi.NodeMap] = None)¶ Bases:
harvesters.core.PayloadRepresents a payload that is classified as
genicam.gentl.PAYLOADTYPE_INFO_IDS.PAYLOAD_TYPE_IMAGEby the GenTL Standard.-
__init__(*, buffer: genicam.gentl.Buffer, node_map: Optional[genicam.genapi.NodeMap] = None)¶ Parameters: - buffer –
- node_map –
-
payload_type¶ The type of the payload.
Type: PAYLOADTYPE_INFO_IDS
-
-
class
harvesters.core.PayloadJPEG(*, buffer: genicam.gentl.Buffer)¶ Bases:
harvesters.core.PayloadRepresents a payload that is classified as
genicam.gentl.PAYLOADTYPE_INFO_IDS.PAYLOAD_TYPE_JPEGby the GenTL Standard.-
__init__(*, buffer: genicam.gentl.Buffer)¶ Parameters: buffer –
-
payload_type¶ The type of the payload.
Type: PAYLOADTYPE_INFO_IDS
-
-
class
harvesters.core.PayloadJPEG2000(*, buffer: genicam.gentl.Buffer)¶ Bases:
harvesters.core.PayloadRepresents a payload that is classified as
genicam.gentl.PAYLOADTYPE_INFO_IDS.PAYLOAD_TYPE_JPEG2000by the GenTL Standard.-
__init__(*, buffer: genicam.gentl.Buffer)¶ Parameters: buffer –
-
payload_type¶ The type of the payload.
Type: PAYLOADTYPE_INFO_IDS
-
-
class
harvesters.core.PayloadMultiPart(*, buffer: genicam.gentl.Buffer, node_map: genicam.genapi.NodeMap)¶ Bases:
harvesters.core.PayloadRepresents a payload that is classified as
genicam.gentl.PAYLOADTYPE_INFO_IDS.PAYLOAD_TYPE_MULTI_PARTby the GenTL Standard.-
__init__(*, buffer: genicam.gentl.Buffer, node_map: genicam.genapi.NodeMap)¶ Parameters: - buffer –
- node_map –
-
payload_type¶ The type of the payload.
Type: PAYLOADTYPE_INFO_IDS
-
-
class
harvesters.core.PayloadRawData(*, buffer: genicam.gentl.Buffer)¶ Bases:
harvesters.core.PayloadRepresents a payload that is classified as
genicam.gentl.PAYLOADTYPE_INFO_IDS.PAYLOAD_TYPE_RAW_DATAby the GenTL Standard.-
__init__(*, buffer: genicam.gentl.Buffer)¶ Parameters: buffer –
-
payload_type¶ The type of the payload.
Type: PAYLOADTYPE_INFO_IDS
-
-
class
harvesters.core.PayloadUnknown(*, buffer: genicam.gentl.Buffer)¶ Bases:
harvesters.core.PayloadRepresents a payload that is classified as
genicam.gentl.PAYLOADTYPE_INFO_IDS.PAYLOAD_TYPE_UNKNOWNby the GenTL Standard.-
__init__(*, buffer: genicam.gentl.Buffer)¶ Parameters: buffer –
-
payload_type¶ The type of the payload.
Type: PAYLOADTYPE_INFO_IDS
-
-
class
harvesters.core.Producer(*, module: genicam.gentl.GenTLProducer)¶ Bases:
harvesters.core.ModuleRepresents a GenTL Producer.
-
__init__(*, module: genicam.gentl.GenTLProducer)¶ Initialize self. See help(type(self)) for accurate signature.
-
module¶ The corresponding GenTL module.
Type: Union[System, Interface, Device, RemoteDevice, DataStream, Buffer]
-
node_map¶ The GenICam feature node map that belongs to the owner object.
Type: NodeMap
-
parent¶ The parent raw GenTL module.
Type: Union[None, System, Interface, Device, RemoteDevice, DataStream]
-
-
class
harvesters.core.RemoteDevice(*, module: genicam.gentl.Device, parent=None, file_path: Optional[str] = None, file_dict: Optional[Dict[str, bytes]] = None, do_clean_up: bool = True, xml_dir_to_store: Optional[str] = None)¶ Bases:
harvesters.core.ModuleRepresents a GenTL Remote Device module.
-
__init__(*, module: genicam.gentl.Device, parent=None, file_path: Optional[str] = None, file_dict: Optional[Dict[str, bytes]] = None, do_clean_up: bool = True, xml_dir_to_store: Optional[str] = None)¶ Initialize self. See help(type(self)) for accurate signature.
-
module¶ The corresponding GenTL module.
Type: Union[System, Interface, Device, RemoteDevice, DataStream, Buffer]
-
node_map¶ The GenICam feature node map that belongs to the owner object.
Type: NodeMap
-
parent¶ The parent raw GenTL module.
Type: Union[None, System, Interface, Device, RemoteDevice, DataStream]
-
-
class
harvesters.core.System(*, module: genicam.gentl.System, parent)¶ Bases:
harvesters.core.ModuleRepresents a GenTL System module.
-
__init__(*, module: genicam.gentl.System, parent)¶ Initialize self. See help(type(self)) for accurate signature.
-
module¶ The corresponding GenTL module.
Type: Union[System, Interface, Device, RemoteDevice, DataStream, Buffer]
-
node_map¶ The GenICam feature node map that belongs to the owner object.
Type: NodeMap
-
parent¶ The parent raw GenTL module.
Type: Union[None, System, Interface, Device, RemoteDevice, DataStream]
-
-
class
harvesters.core.ThreadAdapter(*, mutex=None)¶ Bases:
objectIs a base class that is used to implement threading functionalities by a client so that Harvester can achieve the required tasks through the interface that the
ThreadAdapteroffers.For example, if an application is a PyQt application then it should be necessary to execute threading functionalities by using
QThreadinstead of Python’s built-inThreadclass. In such a case, the client needs to implement a class that is derived from theThreadAdapterclass and map the defined methods toQThreadaccordingly.If your application does not require any special threading implementation, you do not need to do anything with this class. Harvester uses the Python’s built-inThreadclass by default.-
__init__(*, mutex=None)¶ Initialize self. See help(type(self)) for accurate signature.
-
acquire()¶ Acquires a mutex.
This method is abstract and should be reimplemented in any sub-class.
Returns: An acquired MutexLockerobject.Return type: MutexLocker
-
is_running() → bool¶ Returns the truth value of a proposition: The thread is running.
This method is abstract and should be reimplemented in any sub-class.
Returns: Trueif the thread is running. Otherwise it returnsFalse.Return type: bool
-
join()¶ Waits until the given task is completed.
This method is abstract and should be reimplemented in any sub-class.
-
release() → None¶ Releases the acquired mutex.
This method is abstract and should be reimplemented in any sub-class.
-
-
class
harvesters.core.ThreadBase(*, mutex=None)¶ Bases:
harvesters.core.ThreadAdapterAttention
It has been deprecated at 1.3.7 and will be removed in 2.0.0. It will be replaced by
Thread_.-
__init__(*, mutex=None)¶ Initialize self. See help(type(self)) for accurate signature.
-
acquire()¶ Acquires a mutex.
This method is abstract and should be reimplemented in any sub-class.
Returns: An acquired MutexLockerobject.Return type: MutexLocker
-
is_running() → bool¶ Returns the truth value of a proposition: The thread is running.
This method is abstract and should be reimplemented in any sub-class.
Returns: Trueif the thread is running. Otherwise it returnsFalse.Return type: bool
-
join()¶ Waits until the given task is completed.
This method is abstract and should be reimplemented in any sub-class.
-
release() → None¶ Releases the acquired mutex.
This method is abstract and should be reimplemented in any sub-class.
-