Chunk data#

Opto Engineering cameras can append additional information to image data, arranged in chunks. Examples of common chunk data sent with image data are exposure time, image width and height, gain and many other. Each value refers of course to the image it’s sent with. Each chunk stored with the image is represented by a GenICam feature and it can be retrieved by calling the itala.itala.Iimage.get_chunk_node() function of the itala.itala.IImage class.

First of all, chunk data functionality must be manually enabled via the device nodemap.

# Enable chunk data
chunk_mode_active = device.node_map.ChunkModeActive
chunk_mode_active.value = true

Single chunks (each one provided by a dedicated node) can be enabled or disabled individually. The ChunkSelector node allows the client code to select the desired chunk and then enable or disable it via ChunkEnable. For example, let’s enable the exposure time chunk.

# Get the node for chunk data selection and select exposure time chunk
chunk_selector = device.node_map.ChunkSelector
chunk_selector.from_string("ChunkExposureTime")

# Enable the exposure time chunk data
chunk_enable = device.node_map.ChunkEnable
chunk_enable.value = true

When a new image is grabbed, the chunk data nodes can be accessed via its interface.

omage = device.get_next_image(500);

if (image.has_chunk_data)
{
   # Read the chunk value, automatically updated by ItalaApi after grab
   chunk_Exposure_time = image.get_chunk_node("ChunkExposureTime")
   print("Current exposure time is " + str(pChunkExposureTime.value))
}

image.dispose()

Note

Chunk feature names and types are also standardized by SFNC (Standard Feature Naming Convention), which is part of the GenICam standard. Please refer to the official SFNC document to gather information about a particular chunk. Refer to the official GenICam document to find a more in-depth description of the standard. All the material is freely accessible from the GenICam Introduction page.