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.Module
Is provided by an
ImageAcquire
object 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
Buffer
object 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
ImageAcquirer
object before stopping image acquisition calling this method because theImageAcquirer
object tries to clear the self-allocated buffers when it stops image acquisition.
-
-
class
harvesters.core.
Callback
¶ Bases:
object
Is 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:
object
Is 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.Component
Represents a data component that is classified as
PART_DATATYPE_2D_IMAGE
by 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.Component
Attention
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.Component
Represents a data component that is classified as
PART_DATATYPE_UNKNOWN
by 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.Module
Represents 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.Module
Represents 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:
object
Is 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
config
instead. This feature is for development purpose. Please do not setTrue
if you are not a Harvester developer. - logger (Optional[Logger] = None) – Deprecated: will be removed at 2.0.0. Use
config
instead. Set a logger object that you want to bind with the Harevester and its accompanying obects. Ifconfig
is set then this parameter will be ignored. - do_clean_up (bool=True) – Deprecated: will be removed at 2.0.0. Use
config
instead. This feature is for development purpose. Please do not setFalse
if 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
ImageAcquirer
object.Parameters: - list_index – Set an item index of the list of
DeviceInfo
objects. - 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_only
are supported. The default isexclusive
.
Returns: An
ImageAcquirer
object 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:
object
Manages everything you need to acquire images from the connecting device.
-
class
Events
¶ Bases:
enum.IntEnum
Possible events that the
ImageAcquirer
class 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
True
if you want to let the chunk data being updated when a buffer is newly fetched.False
means you will explicitly update the chunk data by yourself when needed. - file_dict (Dict[str, bytes]) –
-
data_streams
¶ A list of GenTL
DataStream
objects that theImageAcquire
object 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
Device
proxy object that theImageAcquire
object 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
Buffer
object 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
True
if 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: True
if 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: True
if it’s been armed for image acquisition; otherwise,False
.
-
is_valid
() → bool¶ bool: Returns
False
and 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 parentHarvester
object make its owningImageAcquirer
objects 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 passingTrue
torun_as_thread
of 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
Device
object, typically a camera, that theImageAcquire
object is working with.Type: RemoteDevice
-
start
(*, run_as_thread: bool = False) → None¶ Starts image acquisition process.
Parameters: run_as_thread (bool) – Set True
if 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
True
if 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.Module
Represents 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.IntEnum
A list of variable/defined parameters.
-
class
harvesters.core.
ParameterSet
(parameter_dict: Optional[Dict[harvesters.core.ParameterKey, Any]] = None)¶ Bases:
object
A 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:
object
Is 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.Payload
Attention
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.Payload
Represents a payload that is classified as
genicam.gentl.PAYLOADTYPE_INFO_IDS.PAYLOAD_TYPE_CHUNK_ONLY
by 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.Payload
Represents a payload that is classified as
genicam.gentl.PAYLOADTYPE_INFO_IDS.PAYLOAD_TYPE_FILE
by 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.Payload
Represents a payload that is classified as
genicam.gentl.PAYLOADTYPE_INFO_IDS.PAYLOAD_TYPE_H264
by 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.Payload
Represents a payload that is classified as
genicam.gentl.PAYLOADTYPE_INFO_IDS.PAYLOAD_TYPE_IMAGE
by 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.Payload
Represents a payload that is classified as
genicam.gentl.PAYLOADTYPE_INFO_IDS.PAYLOAD_TYPE_JPEG
by 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.Payload
Represents a payload that is classified as
genicam.gentl.PAYLOADTYPE_INFO_IDS.PAYLOAD_TYPE_JPEG2000
by 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.Payload
Represents a payload that is classified as
genicam.gentl.PAYLOADTYPE_INFO_IDS.PAYLOAD_TYPE_MULTI_PART
by 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.Payload
Represents a payload that is classified as
genicam.gentl.PAYLOADTYPE_INFO_IDS.PAYLOAD_TYPE_RAW_DATA
by 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.Payload
Represents a payload that is classified as
genicam.gentl.PAYLOADTYPE_INFO_IDS.PAYLOAD_TYPE_UNKNOWN
by 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.Module
Represents 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.Module
Represents 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.Module
Represents 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:
object
Is 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
ThreadAdapter
offers.For example, if an application is a PyQt application then it should be necessary to execute threading functionalities by using
QThread
instead of Python’s built-inThread
class. In such a case, the client needs to implement a class that is derived from theThreadAdapter
class and map the defined methods toQThread
accordingly.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-inThread
class 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 MutexLocker
object.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: True
if 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.ThreadAdapter
Attention
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 MutexLocker
object.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: True
if 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.
-