|
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) |
|
All the methods related to images.
◆ IMG_GetWidth()
ITALA_API_C ItalaError IMG_GetWidth |
( |
H_IMAGE |
hImage, |
|
|
size_t * |
pWidth |
|
) |
| |
Get the width of the image in pixels.
- Parameters
-
[in] | hImage | Handle to Image instance. |
[out] | pWidth | Width 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] | hImage | Handle to Image instance. |
[out] | pHeight | Height 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] | hImage | Handle to Image instance. |
[out] | pOffsetX | Offsex 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] | hImage | Handle to Image instance. |
[out] | pOffsetY | Offsex 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] | hImage | Handle to Image instance. |
[out] | pPaddingX | Padding 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] | hImage | Handle to Image instance. |
[out] | pPaddingY | Padding 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] | hImage | Handle to Image instance. |
[out] | pFormat | Pixel 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] | hImage | Handle to Image instance. |
[out] | pFrameId | ID 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] | hImage | Handle to Image instance. |
[out] | pTimestamp | Timestamp 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] | hImage | Handle to Image instance. |
[out] | pPayloadSize | Payload 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] | hImage | Handle to Image instance. |
[out] | pIsIncomplete | Reports 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] | hImage | Handle to Image instance. |
[out] | pBytesFilled | Amount 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] | hImage | Handle to Image instance. |
[out] | pBuffer | Pointer 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] | hImage | Handle to Image instance. |
[out] | pHasChunkData | Buffer 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] | hImage | Handle to Image instance. |
[in] | name | Name of the node to retrive. |
[out] | phNode | Handle 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] | hImage | Handle to Image instance. |
[out] | phCloneImage | Handle 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] | hImage | Handle to Image instance. |
[in] | dest_format | Pixel format of new image instance. |
[out] | phCloneImage | Handle 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] | hImage | Handle 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] | data | Pointer to the image data. |
[in] | width | Width of the image in pixel. |
[in] | height | Height of the image in pixel. |
[in] | pixelFormat | Pixel format of the image in pixel. |
[out] | phImage | handle to converted image instate. |
- Returns
- ItalaError the error code; return ItalaErrorSuccess (0) if no errors occures.