ItalaApiC  1.3.3
Functions
Image

Functions

ITALA_API_C ItalaError IMG_GetWidth (H_IMAGE hImage, size_t *pWidth)
 
ITALA_API_C ItalaError IMG_GetHeight (H_IMAGE hImage, size_t *pHeight)
 
ITALA_API_C ItalaError IMG_GetOffsetX (H_IMAGE hImage, size_t *pOffsetX)
 
ITALA_API_C ItalaError IMG_GetOffsetY (H_IMAGE hImage, size_t *pOffsetY)
 
ITALA_API_C ItalaError IMG_GetPaddingX (H_IMAGE hImage, size_t *pPaddingX)
 
ITALA_API_C ItalaError IMG_GetPaddingY (H_IMAGE hImage, size_t *pPaddingY)
 
ITALA_API_C ItalaError IMG_GetPixelFormat (H_IMAGE hImage, PfncFormat *pFormat)
 
ITALA_API_C ItalaError IMG_GetFrameID (H_IMAGE hImage, uint64_t *pFrameId)
 
ITALA_API_C ItalaError IMG_GetTimestamp (H_IMAGE hImage, uint64_t *pTimestamp)
 
ITALA_API_C ItalaError IMG_GetPayloadSize (H_IMAGE hImage, size_t *pPayloadSize)
 
ITALA_API_C ItalaError IMG_IsIncomplete (H_IMAGE hImage, bool *pIsIncomplete)
 
ITALA_API_C ItalaError IMG_GetBytesFilled (H_IMAGE hImage, size_t *pBytesFilled)
 
ITALA_API_C ItalaError IMG_GetData (H_IMAGE hImage, void **pBuffer)
 
ITALA_API_C ItalaError IMG_HasChunkData (H_IMAGE hImage, bool *pHasChunkData)
 
ITALA_API_C ItalaError IMG_GetChunkNode (H_IMAGE hImage, const char *name, H_NODE *phNode)
 
ITALA_API_C ItalaError IMG_Clone (H_IMAGE hImage, H_IMAGE *phCloneImage)
 
ITALA_API_C ItalaError IMG_Convert (H_IMAGE hImage, PfncFormat dest_format, H_IMAGE *phCloneImage)
 
ITALA_API_C ItalaError IMG_Dispose (H_IMAGE hImage)
 
ITALA_API_C ItalaError CreateImage (void *data, size_t width, size_t height, PfncFormat pixelFormat, H_IMAGE *phImage)
 

Detailed Description

All the methods related to images.

Function Documentation

◆ IMG_GetWidth()

ITALA_API_C ItalaError IMG_GetWidth ( H_IMAGE  hImage,
size_t *  pWidth 
)

Get the width of the image in pixels.

Parameters
[in]hImageHandle to Image instance.
[out]pWidthWidth of the image in pixels.
Returns
ItalaError the error code; return ItalaErrorSuccess (0) if no errors occures.

◆ IMG_GetHeight()

ITALA_API_C ItalaError IMG_GetHeight ( H_IMAGE  hImage,
size_t *  pHeight 
)

Get the height of the image in pixels.

Parameters
[in]hImageHandle to Image instance.
[out]pHeightHeight of the image in pixels.
Returns
ItalaError the error code; return ItalaErrorSuccess (0) if no errors occures.

◆ IMG_GetOffsetX()

ITALA_API_C ItalaError IMG_GetOffsetX ( H_IMAGE  hImage,
size_t *  pOffsetX 
)

Get the offsex along the X axis of the image, in pixels.

Parameters
[in]hImageHandle to Image instance.
[out]pOffsetXOffsex along the X axis of the image, in pixels.
Returns
ItalaError the error code; return ItalaErrorSuccess (0) if no errors occures.

◆ IMG_GetOffsetY()

ITALA_API_C ItalaError IMG_GetOffsetY ( H_IMAGE  hImage,
size_t *  pOffsetY 
)

Get the offsex along the Y axis of the image, in pixels.

Parameters
[in]hImageHandle to Image instance.
[out]pOffsetYOffsex along the Y axis of the image, in pixels.
Returns
ItalaError the error code; return ItalaErrorSuccess (0) if no errors occures.

◆ IMG_GetPaddingX()

ITALA_API_C ItalaError IMG_GetPaddingX ( H_IMAGE  hImage,
size_t *  pPaddingX 
)

Get the padding along the X axis of the image, in pixels.

Parameters
[in]hImageHandle to Image instance.
[out]pPaddingXPadding along the X axis of the image, in pixels.
Returns
ItalaError the error code; return ItalaErrorSuccess (0) if no errors occures.

◆ IMG_GetPaddingY()

ITALA_API_C ItalaError IMG_GetPaddingY ( H_IMAGE  hImage,
size_t *  pPaddingY 
)

Get the padding along the Y axis of the image, in pixels.

Parameters
[in]hImageHandle to Image instance.
[out]pPaddingYPadding along the Y axis of the image, in pixels.
Returns
ItalaError the error code; return ItalaErrorSuccess (0) if no errors occures.

◆ IMG_GetPixelFormat()

ITALA_API_C ItalaError IMG_GetPixelFormat ( H_IMAGE  hImage,
PfncFormat *  pFormat 
)

Get the pixel format of the image. The PFNC standard from GenICam is used to identify the format.

Parameters
[in]hImageHandle to Image instance.
[out]pFormatPixel format of the image.
Returns
ItalaError the error code; return ItalaErrorSuccess (0) if no errors occures.

◆ IMG_GetFrameID()

ITALA_API_C ItalaError IMG_GetFrameID ( H_IMAGE  hImage,
uint64_t *  pFrameId 
)

Get the ID of the image.

Parameters
[in]hImageHandle to Image instance.
[out]pFrameIdID of the image.
Returns
ItalaError the error code; return ItalaErrorSuccess (0) if no errors occures.

◆ IMG_GetTimestamp()

ITALA_API_C ItalaError IMG_GetTimestamp ( H_IMAGE  hImage,
uint64_t *  pTimestamp 
)

Get the timestamp of the image.

Parameters
[in]hImageHandle to Image instance.
[out]pTimestampTimestamp of the image.
Returns
ItalaError the error code; return ItalaErrorSuccess (0) if no errors occures.

◆ IMG_GetPayloadSize()

ITALA_API_C ItalaError IMG_GetPayloadSize ( H_IMAGE  hImage,
size_t *  pPayloadSize 
)

Get the payload size of the image, in bytes.

Parameters
[in]hImageHandle to Image instance.
[out]pPayloadSizePayload size of the image.
Returns
ItalaError the error code; return ItalaErrorSuccess (0) if no errors occures.

◆ IMG_IsIncomplete()

ITALA_API_C ItalaError IMG_IsIncomplete ( H_IMAGE  hImage,
bool *  pIsIncomplete 
)

Reports wether the grabbed image is incomplete, i.e. some bytes are missing due to transfer issues.

Parameters
[in]hImageHandle to Image instance.
[out]pIsIncompleteReports image is incomplete.
Returns
ItalaError the error code; return ItalaErrorSuccess (0) if no errors occures.

◆ IMG_GetBytesFilled()

ITALA_API_C ItalaError IMG_GetBytesFilled ( H_IMAGE  hImage,
size_t *  pBytesFilled 
)

Get the amount of bytes actually stored in the buffer.

Parameters
[in]hImageHandle to Image instance.
[out]pBytesFilledAmount of bytes actually stored in the buffer.
Returns
ItalaError the error code; return ItalaErrorSuccess (0) if no errors occures.

◆ IMG_GetData()

ITALA_API_C ItalaError IMG_GetData ( H_IMAGE  hImage,
void **  pBuffer 
)

Get the pointer to the memory buffer containing the grabbed data. The content is retrieved directly from the device and, if chunk data functionality is enabled, the chunks are also included in the buffer.

Parameters
[in]hImageHandle to Image instance.
[out]pBufferPointer to the memory buffer containing the grabbed data.
Returns
ItalaError the error code; return ItalaErrorSuccess (0) if no errors occures.

◆ IMG_HasChunkData()

ITALA_API_C ItalaError IMG_HasChunkData ( H_IMAGE  hImage,
bool *  pHasChunkData 
)

Report wether the buffer contains chunk data or not.

Parameters
[in]hImageHandle to Image instance.
[out]pHasChunkDataBuffer contains chunk data or not.
Returns
ItalaError the error code; return ItalaErrorSuccess (0) if no errors occures.

◆ IMG_GetChunkNode()

ITALA_API_C ItalaError IMG_GetChunkNode ( H_IMAGE  hImage,
const char *  name,
H_NODE *  phNode 
)

Get the specified node from the internal chunk data nodemap.

Parameters
[in]hImageHandle to Image instance.
[in]nameName of the node to retrive.
[out]phNodeHandle to Node instance.
Returns
ItalaError the error code; return ItalaErrorSuccess (0) if no errors occures.

◆ IMG_Clone()

ITALA_API_C ItalaError IMG_Clone ( H_IMAGE  hImage,
H_IMAGE *  phCloneImage 
)

Creates a new image cloned from the current one with its own allocated memory. It needs to be disposed when it's no longer required via IMG_Dispose().

Parameters
[in]hImageHandle to Image instance.
[out]phCloneImageHandle to Image clone instance.
Returns
ItalaError the error code; return ItalaErrorSuccess (0) if no errors occures.

◆ IMG_Convert()

ITALA_API_C ItalaError IMG_Convert ( H_IMAGE  hImage,
PfncFormat  dest_format,
H_IMAGE *  phCloneImage 
)

Creates a new image converted from the current one with its own allocated memory and the specified pixel format. It needs to be disposed when it's no longer required via IMG_Dispose().

Warning
When converting from packed to unpacked formats, the resulting data is aligned according to the PFNC specification. Most of the time the resulting data is LSB aligned, e.g. a 12-bit pixel value stored in a 16-bit component has its MSBs padded with zeroes. See the official PFNC document hosted by EMVA for details.
Parameters
[in]hImageHandle to Image instance.
[in]dest_formatPixel format of new image instance.
[out]phCloneImageHandle to Image clone instance.
Returns
ItalaError the error code; return ItalaErrorSuccess (0) if no errors occures.

◆ IMG_Dispose()

ITALA_API_C ItalaError IMG_Dispose ( H_IMAGE  hImage)

Dispose the instance of the Image.

Parameters
[in]hImageHandle to Image instance.
Returns
ItalaError the error code; return ItalaErrorSuccess (0) if no errors occures.

◆ CreateImage()

ITALA_API_C ItalaError CreateImage ( void *  data,
size_t  width,
size_t  height,
PfncFormat  pixelFormat,
H_IMAGE *  phImage 
)

Creates a new image from a memory buffer by copying and taking ownership of the data. The size in bytes of the buffer is obtained from the width, height and format provided by the caller. For that reason, Y padding in the buffer is ignored while X padding is not supported.

Note
Chunk data access and grab related info are not available for created images.
Parameters
[in]dataPointer to the image data.
[in]widthWidth of the image in pixel.
[in]heightHeight of the image in pixel.
[in]pixelFormatPixel format of the image in pixel.
[out]phImagehandle to converted image instate.
Returns
ItalaError the error code; return ItalaErrorSuccess (0) if no errors occures.