Image Component Library (ICL)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Static Public Member Functions
icl::core::ImageSerializer Struct Reference

Utility class for binary Image Serialization. More...

#include <ImageSerializer.h>

List of all members.

Public Types

typedef std::vector< icl8uImageHeader
 Internally used type for image headers.

Static Public Member Functions

static int getHeaderSize ()
 returns the size of an image header (in Bytes)
static int estimateImageDataSize (const ImgBase *image) throw (utils::ICLException)
 estimates the size for the image data of an serialized image
static int estimateSerializedSize (const ImgBase *image, bool skipMetaData=false) throw (utils::ICLException)
 estimates the full size of an serialized image
static ImageHeader createHeader (const ImgBase *image) throw (utils::ICLException)
 creates an image header from given image
static void serialize (const ImgBase *image, icl8u *dst, const ImageHeader &header=ImageHeader(), bool skipMetaData=false) throw (utils::ICLException)
 serializes an image into given destination data-points (which has to be long enough)
static void serialize (const ImgBase *image, std::vector< icl8u > &data, const ImageHeader &header=ImageHeader(), bool skipMetaData=false) throw (utils::ICLException)
 serializes an image into given vector (the vector size is adapted automatically)
static void deserialize (const icl8u *data, ImgBase **dst) throw (utils::ICLException)
 deserializes an image (and optionally also the meta-data) from given icl8u data block
static utils::Time deserializeTimeStamp (const icl8u *data) throw (utils::ICLException)
 extracts only an images TimeStamp from it's serialized form

Detailed Description

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  ->
        

Member Typedef Documentation

Internally used type for image headers.


Member Function Documentation

creates an image header from given image

static void icl::core::ImageSerializer::deserialize ( const icl8u data,
ImgBase **  dst 
) throw (utils::ICLException) [static]

deserializes an image (and optionally also the meta-data) from given icl8u data block

extracts only an images TimeStamp from it's serialized form

static int icl::core::ImageSerializer::estimateImageDataSize ( const ImgBase image) throw (utils::ICLException) [static]

estimates the size for the image data of an serialized image

static int icl::core::ImageSerializer::estimateSerializedSize ( const ImgBase image,
bool  skipMetaData = false 
) throw (utils::ICLException) [static]

estimates the full size of an serialized image

returns the size of an image header (in Bytes)

static void icl::core::ImageSerializer::serialize ( const ImgBase image,
icl8u dst,
const ImageHeader header = ImageHeader(),
bool  skipMetaData = false 
) throw (utils::ICLException) [static]

serializes an image into given destination data-points (which has to be long enough)

static void icl::core::ImageSerializer::serialize ( const ImgBase image,
std::vector< icl8u > &  data,
const ImageHeader header = ImageHeader(),
bool  skipMetaData = false 
) throw (utils::ICLException) [static]

serializes an image into given vector (the vector size is adapted automatically)


The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines