Impact Acquire SDK .NET
GenICam™ GenDC Format

Since version 2.50 Impact Acquire supports the GenICam™ GenDC format developed by the GenICam working group. This format was triggered by the need to allow various vendors to transfer specific payload without the need to standardize a new payload format all the time. By using this format devices have an interoperable way to transfer e.g. 3D data which typically consists of several independent parts of data belonging together. So the main idea was to be able to report a single block of memory to the user that contains all this information and to have an interface that can access each part of this block of memory. A typical example where the GenDC format could be used is with a 3D camera or a dual head stereo camera where either multiple images that logically belong together (left sensor and right sensor or 3D image and confidence mask). But there are other use cases as well like e.g. when a device supports a hardware JPEG encoder an application might want to access both the raw data and the compressed data for different purposes like perform image processing on the raw data while streaming the compressed data via the network.

The API for accessing GenDC or multi-part data belonging to a mv.impact.acquire.Request object basically consists of a property and one function:

properties residing in a separate list BufferParts within each request.

When mv.impact.acquire.TPayloadType.ptGenDC data is reported by the mv.impact.acquire.Request.payloadType property and the mv.impact.acquire.SystemSettings.genDCParserEnable property is set to mv.impact.acquire.TBoolean.bTrue (the default) all the properties residing in the Image list of a request are don't care thus have the cfInvisible flag set. If normal (thus non-multi-part or GenDC) data is reported or mv.impact.acquire.SystemSettings.genDCParserEnable is switched off all properties residing in the BufferParts list of a request are don't care thus have the cfInvisible flag set. For GenDC data then mv.impact.acquire.Request.imageData points to the start of the container descriptor. Details on how to parse a GenICam™ GenDC descriptor can be found in the GenDC specification

The memory layout of a GenDC buffer can roughly be described like this:

One way of dealing with GenDC data in Impact Acquire could be implemented like this:

// ... more code
requestNr = fi.imageRequestWaitFor(timeout_ms);
pRequest = fi.isRequestNrValid(requestNr) ? fi.getRequest(requestNr) : null;
if (pRequest != null)
{
if (pRequest.isOK)
{
int bufferPartCount = pRequest.bufferPartCount;
if (bufferPartCount > 0)
{
// data has been delivered in GenDC or multi-part format. Features like 'pRequest.imageWidth' are "don't care"
for (int i = 0; i < bufferPartCount; i++)
{
BufferPart part = pRequest.getBufferPart(i);
Console.WriteLine("Part {0} carries data type {1}, {2} bytes starting at {3}", i, part.dataType.readS(), part.dataSize.read(), part.address.read());
}
}
else
{
// access feature the standard way. This buffer does not carry GenDC or multi-part information
Console.WriteLine("Data has been captured: {0}x{1}@{2}x{3}({4})", pRequest.imageOffsetX.read(), pRequest.imageOffsetY.read(),
pRequest.imageWidth.read(), pRequest.imageHeight.read(), pRequest.imagePixelFormat.readS());
}
// chunk data evaluation would start here as it works exactly the same way no matter in which
// format the data is delivered!
// ... even more code

In case the unprocessed GenDC container shall be received something like this could be implemented:

// ... more code
SystemSettings ss = new SystemSettings(getDevicePointerFromSomewhere());
ss.genDCParserEnable.write( TBoolean.bFalse );
// ... more code
FunctionInterface fi = getFunctionInterfaceFromSomewhere();
int requestNr = fi.imageRequestWaitFor(timeout_ms);
pRequest = fi.isRequestNrValid(requestNr) ? fi.getRequest(requestNr) : null;
if(pRequest != null)
{
if(pRequest.isOK)
{
if(pRequest.payloadType.read() == TPayloadType.ptGenDC )
{
// This buffer does carry a GenDC container
Console.WriteLine("A GenDC Container has been captured! Start parsing it at {0}.", pRequest.imageData.read());
}
else
{
// In case GenDC and nothing else was expected raise the alarm
}
// ... even more code

Limitations

For mv.impact.acquire.TPayloadType.ptGenDC payload currently the same limitations as described here will apply: Limitations