Device#
- class itala.itala.IDevice(*args, **kwargs)#
Bases:
IDisposable
- property thisown#
The membership flag
- start_acquisition(*args)#
Overload 1:
Starts the image acquisition on the device. A number of buffers equal to bufferCount is allocated and kept in the acquisition engine input pool. Internally, the acquisition engine picks buffers from the input pool and fills them with new data, before pushing them to the output queue, in accordance with the policy defined by the GenTL SFNC standard feature “StreamBufferHandlingMode” (configurable through the Datastream nodemap). The acquisition engine keeps running until numFrames frames are pushed to the output queue (i.e. until the specified amount of frames is available to the user). The AcquisitionStart GenICam command is automatically executed and all the acquisition critical features are automatically locked by ItalaApi.
- Parameters:
bufferCount (int) – number of buffers to be used for acquisition
numFrames (int) – number of frames to be acquired. If 0, the acquisition runs continuously until IDevice::StopAcquisition is called.
Overload 2:
Starts a continuous acquisition by calling IDevice::StartAcquisition with a default count of 16 image buffers (so a maximum of 16 images can be grabbed and kept simultaneously without disposing them).
- stop_acquisition()#
The image acquisition is stopped and all the resources deallocated. The AcquisitionStop GenICam command is automatically executed and all the acquisition critical features are automatically unlocked by ItalaApi.
- get_next_image(timeout)#
Grabs the first available image buffer in the output queue of the acquisition engine. If the specified timeout expires, a TimeoutException occurs. When an image buffer is grabbed, it’s removed from the acquisition engine and delivered to the client code so that its data can be used. When the image buffer is no longer required by the client code, it must be disposed with IDevice::Dispose. This way, the image buffer is reintroduced in the acquisition engine and filled again if the acquisition is still running. Infact, if N grabbed image buffers are held by the client code, the number of buffers available to the acquisition engine is smaller by N buffers. When all available image buffers are held by the client code without being disposed, a timeout exception occurs on grab, since no filled image buffers are present.
- Parameters:
timeout (int) – the amount of time in millisecond to wait for a new image
- Return type:
- Returns:
GENTL image buffer
- enable_events()#
Starts the event functionality. The event listening thread is started and ItalaApi waits for incoming events from the device (which requires a separate configuration via GenApi for event initialization).
- disable_events()#
Stops the event functionality. The event listening thread is stopped.
- register_handler(handler)#
Subscribes a DeviceEventHandler instance to the current device. The implementation must be provided by the client code.
- Parameters:
handler (
DeviceEventHandler
) – of the device event handler.
- deregister_handler()#
Removes the device event handler instance registered.
- property node_map: INodeMap#
Get the GenICam nodemap of the physical device. The nodemap instance is accessible via GenApi library and allows the user to configure the behaviour of the camera. The nodemap is owned by ItalaApi.
- Return type:
- Returns:
Device nodemap.
- property tl_device_node_map: INodeMap#
Get the GenICam nodemap of GenTL’s Local Device module. The nodemap instance is accessible via GenApi library and allows the user to configure the behaviour of the module. The nodemap is owned by ItalaApi.
- Return type:
- Returns:
GenTL Local Device module’s nodemap.
- property datastream_node_map: INodeMap#
Get the GenICam nodemap of GenTL’s Datastream module. The nodemap instance is accessible via GenApi library and allows the user to configure the behaviour of the module. The nodemap is owned by ItalaApi.
- Return type:
- Returns:
GenTL Datastream module’s nodemap.
- property timestamp_frequency: int#
Get the tick frequency of the device timestamp counter in ticks per second.
- Return type:
int
- Returns:
Timestamp’s frequency in tick per seconds.
- property info: DeviceInfo#
Get the informatin object of the device.
- Return type:
- Returns:
The DeviceInfo object.