Go to the source code of this file.
Classes | |
struct | igtl_ndarray_info |
Macros | |
#define | IGTL_NDARRAY_HEADER_SIZE 2 |
#define | IGTL_NDARRAY_HOST_TO_NETWORK 0 |
#define | IGTL_NDARRAY_NETWORK_TO_HOST 1 |
#define | IGTL_NDARRAY_STYPE_TYPE_COMPLEX 13 |
#define | IGTL_NDARRAY_STYPE_TYPE_FLOAT32 10 |
#define | IGTL_NDARRAY_STYPE_TYPE_FLOAT64 11 |
#define | IGTL_NDARRAY_STYPE_TYPE_INT16 4 |
#define | IGTL_NDARRAY_STYPE_TYPE_INT32 6 |
#define | IGTL_NDARRAY_STYPE_TYPE_INT8 2 |
#define | IGTL_NDARRAY_STYPE_TYPE_UINT16 5 |
#define | IGTL_NDARRAY_STYPE_TYPE_UINT32 7 |
#define | IGTL_NDARRAY_STYPE_TYPE_UINT8 3 |
Functions | |
int igtl_export | igtl_ndarray_alloc_info (igtl_ndarray_info *info, const igtl_uint16 *size) |
int igtl_export | igtl_ndarray_free_info (igtl_ndarray_info *info) |
igtl_uint64 igtl_export | igtl_ndarray_get_crc (igtl_ndarray_info *info, int type, void *byte_array) |
igtl_uint64 igtl_export | igtl_ndarray_get_size (igtl_ndarray_info *info, int type) |
void igtl_export | igtl_ndarray_init_info (igtl_ndarray_info *info) |
int igtl_export | igtl_ndarray_pack (igtl_ndarray_info *info, void *byte_array, int type) |
int igtl_export | igtl_ndarray_unpack (int type, void *byte_array, igtl_ndarray_info *info, igtl_uint64 pack_size) |
#define IGTL_NDARRAY_HEADER_SIZE 2 |
Definition at line 23 of file igtl_ndarray.h.
#define IGTL_NDARRAY_HOST_TO_NETWORK 0 |
Definition at line 36 of file igtl_ndarray.h.
#define IGTL_NDARRAY_NETWORK_TO_HOST 1 |
Definition at line 37 of file igtl_ndarray.h.
#define IGTL_NDARRAY_STYPE_TYPE_COMPLEX 13 |
Definition at line 34 of file igtl_ndarray.h.
#define IGTL_NDARRAY_STYPE_TYPE_FLOAT32 10 |
Definition at line 32 of file igtl_ndarray.h.
#define IGTL_NDARRAY_STYPE_TYPE_FLOAT64 11 |
Definition at line 33 of file igtl_ndarray.h.
#define IGTL_NDARRAY_STYPE_TYPE_INT16 4 |
Definition at line 28 of file igtl_ndarray.h.
#define IGTL_NDARRAY_STYPE_TYPE_INT32 6 |
Definition at line 30 of file igtl_ndarray.h.
#define IGTL_NDARRAY_STYPE_TYPE_INT8 2 |
Definition at line 26 of file igtl_ndarray.h.
#define IGTL_NDARRAY_STYPE_TYPE_UINT16 5 |
Definition at line 29 of file igtl_ndarray.h.
#define IGTL_NDARRAY_STYPE_TYPE_UINT32 7 |
Definition at line 31 of file igtl_ndarray.h.
#define IGTL_NDARRAY_STYPE_TYPE_UINT8 3 |
Definition at line 27 of file igtl_ndarray.h.
int igtl_export igtl_ndarray_alloc_info | ( | igtl_ndarray_info * | info, |
const igtl_uint16 * | size | ||
) |
Allocates size array and ND-array pointed from igtl_ndarray_info. 'type' and 'dim' in igtl_ndarray_info must be specified before calling igtl_ndarray_alloc_info().
int igtl_export igtl_ndarray_free_info | ( | igtl_ndarray_info * | info | ) |
Frees ndarray
igtl_uint64 igtl_export igtl_ndarray_get_crc | ( | igtl_ndarray_info * | info, |
int | type, | ||
void * | byte_array | ||
) |
Calculates CRC of image data body including header and array of pixel data.
igtl_uint64 igtl_export igtl_ndarray_get_size | ( | igtl_ndarray_info * | info, |
int | type | ||
) |
Calculates size of N-D array body including size table (defined by UINT16[dim]) and array data.
void igtl_export igtl_ndarray_init_info | ( | igtl_ndarray_info * | info | ) |
Initializes igtl_ndarray_info
int igtl_export igtl_ndarray_pack | ( | igtl_ndarray_info * | info, |
void * | byte_array, | ||
int | type | ||
) |
Converts an igtl_ndarray_info structure to a byte array. 'byte_array' should be allocated prior to calling igtl_ndarray_pack() with memory size calculated by igtl_ndarray_get_size(). 'type' argument specifies a message type prefix (none, or GET_) by IGTL_TYPE_PREFIX_* macro. Returns 1 if success, otherwise 0.
int igtl_export igtl_ndarray_unpack | ( | int | type, |
void * | byte_array, | ||
igtl_ndarray_info * | info, | ||
igtl_uint64 | pack_size | ||
) |
Unpacks and extracts information in a byte array of NDARRAY messages and store it in a igtl_ndarray_info structure. 'type' argument specifies a message type prefix (none, GET_, STT_, STP_ or RTS_) by IGTL_TYPE_PREFIX_* macro. Returns 1 if success, otherwise 0.