Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  
Classes | Macros | Functions
igtl_polydata.h File Reference
#include "igtl_win32header.h"
#include "igtl_header.h"
#include "igtl_util.h"
#include "igtl_types.h"
Include dependency graph for igtl_polydata.h:

Go to the source code of this file.

Classes

struct  igtl_polydata_attribute
 
struct  igtl_polydata_attribute_header
 
struct  igtl_polydata_header
 
struct  igtl_polydata_info
 

Macros

#define IGTL_POLY_ATTR_TYPE_NORMAL   0x02
 
#define IGTL_POLY_ATTR_TYPE_RGBA   0x04
 
#define IGTL_POLY_ATTR_TYPE_SCALAR   0x00
 
#define IGTL_POLY_ATTR_TYPE_TENSOR   0x03
 
#define IGTL_POLY_ATTR_TYPE_VECTOR   0x01
 
#define IGTL_POLY_MAX_ATTR_NAME_LEN   255
 

Functions

igtl_uint64 igtl_export igtl_polydata_get_crc (igtl_polydata_info *info, int type, void *polydata_message)
 
igtl_uint64 igtl_export igtl_polydata_get_size (igtl_polydata_info *info, int type)
 
void igtl_export igtl_polydata_init_info (igtl_polydata_info *info)
 
int igtl_export igtl_polydata_pack (igtl_polydata_info *info, void *byte_array, int type)
 
int igtl_export igtl_polydata_unpack (int type, void *byte_array, igtl_polydata_info *info, igtl_uint64 size)
 
int igtl_export igtl_polydata_alloc_info (igtl_polydata_info *info)
 
int igtl_export igtl_polydata_free_info (igtl_polydata_info *info)
 

Macro Definition Documentation

#define IGTL_POLY_ATTR_TYPE_NORMAL   0x02

Definition at line 34 of file igtl_polydata.h.

#define IGTL_POLY_ATTR_TYPE_RGBA   0x04

Definition at line 36 of file igtl_polydata.h.

#define IGTL_POLY_ATTR_TYPE_SCALAR   0x00

Definition at line 32 of file igtl_polydata.h.

#define IGTL_POLY_ATTR_TYPE_TENSOR   0x03

Definition at line 35 of file igtl_polydata.h.

#define IGTL_POLY_ATTR_TYPE_VECTOR   0x01

Definition at line 33 of file igtl_polydata.h.

#define IGTL_POLY_MAX_ATTR_NAME_LEN   255

Definition at line 30 of file igtl_polydata.h.

Function Documentation

int igtl_export igtl_polydata_alloc_info ( igtl_polydata_info info)

Allocates free arrays in polydata_info. Note that igtl_polydata_alloc_info() does not allocate memory for 'name' and 'data' in each igtl_polydata_attribute. Those elements have to be allocated in the developers responsibility. igtl_polydata_free_info() function assumes that igtl_polydata_info is allocated by igtl_polydata_alloc_info() and all memory blocks pointed from igtl_polydata_attribute have been allocated by malloc(). Return 1 if the array is successfully allocated/freed.

int igtl_export igtl_polydata_free_info ( igtl_polydata_info info)

Allocates free arrays in polydata_info. Note that igtl_polydata_alloc_info() does not allocate memory for 'name' and 'data' in each igtl_polydata_attribute. Those elements have to be allocated in the developers responsibility. igtl_polydata_free_info() function assumes that igtl_polydata_info is allocated by igtl_polydata_alloc_info() and all memory blocks pointed from igtl_polydata_attribute have been allocated by malloc(). Return 1 if the array is successfully allocated/freed.

igtl_uint64 igtl_export igtl_polydata_get_crc ( igtl_polydata_info info,
int  type,
void *  polydata_message 
)

Calculates CRC of POLYDATA message. Note that 'info' is used only for getting size of the message.

igtl_uint64 igtl_export igtl_polydata_get_size ( igtl_polydata_info info,
int  type 
)

igtl_polydata_get_size() calculates the size of polydata header, consisting of POLYDATA hearder section (including number of child messages) and name table section based on a igtl_polydata_header. The size returned from this function does not include size of child message data. 'type' argument specifies a message type prefix (none, GET_, STT_, STP_ or RTS_) by IGTL_TYPE_PREFIX_* macro.

void igtl_export igtl_polydata_init_info ( igtl_polydata_info info)

Initializes igtl_polydata_info

int igtl_export igtl_polydata_pack ( igtl_polydata_info info,
void *  byte_array,
int  type 
)

Converts an igtl_polydata_info structure to a byte array. 'byte_array' should be allocated prior to calling igtl_polydata_pack() with memory size calculated by igtl_polydata_get_size(). 'type' argument specifies a message type prefix (none, GET_, STT_, STP_ or RTS_) by IGTL_TYPE_PREFIX_* macro. Returns 1 if success, otherwise 0.

int igtl_export igtl_polydata_unpack ( int  type,
void *  byte_array,
igtl_polydata_info info,
igtl_uint64  size 
)

Extracts information about child messages in a byte array of POLYDATA messages and store it in a igtl_polydata_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.


Generated at Mon Nov 11 2013 00:36:46 for OpenIGTLink by doxygen 1.8.5 written by Dimitri van Heesch, © 1997-2012