Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  
igtl_trajectory.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: The OpenIGTLink Library
4  Language: C
5  Web page: http://openigtlink.org/
6 
7  Copyright (c) Insight Software Consortium. All rights reserved.
8 
9  This software is distributed WITHOUT ANY WARRANTY; without even
10  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11  PURPOSE. See the above copyright notices for more information.
12 
13 =========================================================================*/
14 
15 #ifndef __IGTL_TRAJECTORY_H
16 #define __IGTL_TRAJECTORY_H
17 
18 #include "igtl_win32header.h"
19 #include "igtl_util.h"
20 #include "igtl_types.h"
21 
22 #define IGTL_TRAJECTORY_ELEMENT_SIZE 150
23 #define IGTL_TRAJECTORY_LEN_NAME 64
24 #define IGTL_TRAJECTORY_LEN_GROUP_NAME 32
25 #define IGTL_TRAJECTORY_LEN_OWNER 20
26 
27 #define IGTL_TRAJECTORY_TYPE_ENTRY_ONLY 1
28 #define IGTL_TRAJECTORY_TYPE_TARGET_ONLY 2
29 #define IGTL_TRAJECTORY_TYPE_ENTRY_TARGET 3
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
35 #pragma pack(1) /* For 1-byte boundary in memroy */
36 
38 typedef struct {
39  char name[IGTL_TRAJECTORY_LEN_NAME]; /* Name or description of the trajectory */
40  char group_name[IGTL_TRAJECTORY_LEN_GROUP_NAME]; /* Can be "Trajectory", ... */
41  igtl_int8 type; /* Trajectory type (see IGTL_TRAJECTORY_TYPE_* macros) */
42  igtl_int8 reserved;
43  igtl_uint8 rgba[4]; /* Color in R/G/B/A */
44  igtl_float32 entry_pos[3]; /* Coordinate of the entry point */
45  igtl_float32 target_pos[3]; /* Coordinate of the target point */
46  igtl_float32 radius; /* Radius of the trajectory. Can be 0. */
47  char owner_name[IGTL_TRAJECTORY_LEN_OWNER]; /* Device name of the ower image */
49 
50 #pragma pack()
51 
52 
55 #define igtl_trajectory_get_data_size(n) ((n) * IGTL_TRAJECTORY_ELEMENT_SIZE)
56 
59 #define igtl_trajectory_get_data_n(size) ((size) / IGTL_TRAJECTORY_ELEMENT_SIZE)
60 
65 
67 igtl_uint64 igtl_export igtl_trajectory_get_crc(igtl_trajectory_element* trajectorylist, int nelem);
68 
69 #ifdef __cplusplus
70 }
71 #endif
72 
73 #endif /* __IGTL_POSITION_H */
74 
75 
#define IGTL_TRAJECTORY_LEN_OWNER
#define igtl_export
igtl_uint64 igtl_export igtl_trajectory_get_crc(igtl_trajectory_element *trajectorylist, int nelem)
#define IGTL_TRAJECTORY_LEN_GROUP_NAME
void igtl_export igtl_trajectory_convert_byte_order(igtl_trajectory_element *trajectorylist, int nelem)
#define IGTL_TRAJECTORY_LEN_NAME

Generated at Mon Nov 11 2013 05:19:48 for OpenIGTLink by doxygen 1.8.5 written by Dimitri van Heesch, © 1997-2012