Image Component Library (ICL)
|
Utility class for binary Image Serialization. More...
#include <ImageSerializer.h>
Public Types | |
typedef std::vector< icl8u > | ImageHeader |
Internally used type for image headers. More... | |
Static Public Member Functions | |
static int | getHeaderSize () |
returns the size of an image header (in Bytes) More... | |
static int | estimateImageDataSize (const ImgBase *image) |
estimates the size for the image data of an serialized image More... | |
static int | estimateSerializedSize (const ImgBase *image, bool skipMetaData=false) |
estimates the full size of an serialized image More... | |
static ImageHeader | createHeader (const ImgBase *image) |
creates an image header from given image More... | |
static void | serialize (const ImgBase *image, icl8u *dst, const ImageHeader &header=ImageHeader(), bool skipMetaData=false) |
serializes an image into given destination data-points (which has to be long enough) More... | |
static void | serialize (const ImgBase *image, std::vector< icl8u > &data, const ImageHeader &header=ImageHeader(), bool skipMetaData=false) |
serializes an image into given vector (the vector size is adapted automatically) More... | |
static void | deserialize (const icl8u *data, ImgBase **dst) |
deserializes an image (and optionally also the meta-data) from given icl8u data block More... | |
static utils::Time | deserializeTimeStamp (const icl8u *data) |
extracts only an images TimeStamp from it's serialized form More... | |
Utility class for binary Image Serialization.
Images are serialized into one binary data block as follows:
Whole-Image: [Header-Block][Channel-0-Data][Channel-1-Data][ ... ][Meta-Data] <- 44 Bytes -><- Channels x dim x sizeof(datatype) ->
The Header-Block contains a binary representation of all image properties:
Header-Block: [depth][width][height][format][channels][roi.x][roi.y][roi.width][roi.height][time-stamp] <- 4 -><- 4 -><- 4 -><- 4 -><- 4 -><- 4 -><- 4 -><- 4 -><- 4 -><- 8 -> (in Bytes)
Finally the optional meta-data block can be used to attach additional information to images:
Meta-Data-Block: [size][Meta-Data] <-4 -><- size ->
typedef std::vector<icl8u> icl::core::ImageSerializer::ImageHeader |
Internally used type for image headers.
|
static |
creates an image header from given image
deserializes an image (and optionally also the meta-data) from given icl8u data block
|
static |
extracts only an images TimeStamp from it's serialized form
|
static |
estimates the size for the image data of an serialized image
|
static |
estimates the full size of an serialized image
|
static |
returns the size of an image header (in Bytes)
|
static |
serializes an image into given destination data-points (which has to be long enough)
|
static |
serializes an image into given vector (the vector size is adapted automatically)