Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  
igtl_imgmeta.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_IMGMETA_H
16#define __IGTL_IMGMETA_H
17
18#include "igtl_win32header.h"
19#include "igtl_util.h"
20#include "igtl_types.h"
21#include "igtl_image.h"
22
23#define IGTL_IMGMETA_ELEMENT_SIZE 260
24
25/* Scalar type */
26/* Use the same numbers as IMAGE */
27/*
28#define IGTL_IMGMETA_STYPE_TYPE_INT8 2
29#define IGTL_IMGMETA_STYPE_TYPE_UINT8 3
30#define IGTL_IMGMETA_STYPE_TYPE_INT16 4
31#define IGTL_IMGMETA_STYPE_TYPE_UINT16 5
32#define IGTL_IMGMETA_STYPE_TYPE_INT32 6
33#define IGTL_IMGMETA_STYPE_TYPE_UINT32 7
34#define IGTL_IMGMETA_STYPE_TYPE_FLOAT32 10
35#define IGTL_IMGMETA_STYPE_TYPE_FLOAT64 11
36*/
37
38#define IGTL_IMGMETA_LEN_NAME 64
39#define IGTL_IMGMETA_LEN_DEVICE_NAME 20
40#define IGTL_IMGMETA_LEN_MODALITY 32
41#define IGTL_IMGMETA_LEN_PATIENT_NAME 64
42#define IGTL_IMGMETA_LEN_PATIENT_ID 64
43
44
45#ifdef __cplusplus
46extern "C" {
47#endif
48
49#pragma pack(1) /* For 1-byte boundary in memroy */
50
55typedef struct {
56 char name[IGTL_IMGMETA_LEN_NAME]; /* name / description */
57 char device_name[IGTL_IMGMETA_LEN_DEVICE_NAME]; /* device name to query the IMAGE and COLORT */
58 char modality[IGTL_IMGMETA_LEN_MODALITY]; /* modality name */
59 char patient_name[IGTL_IMGMETA_LEN_PATIENT_NAME]; /* patient name */
60 char patient_id[IGTL_IMGMETA_LEN_PATIENT_ID]; /* patient ID (MRN etc.) */
61 igtl_uint64 timestamp; /* scan time */
62 igtl_uint16 size[3]; /* entire image volume size */
63 igtl_uint8 scalar_type; /* scalar type. see scalar_type in IMAGE message */
64 igtl_uint8 reserved;
67
68#pragma pack()
69
74#define igtl_imgmeta_get_data_size(n) ((n) * IGTL_IMGMETA_ELEMENT_SIZE)
75#define igtl_imgmeta_get_data_n(size) ((size) / IGTL_IMGMETA_ELEMENT_SIZE)
76
80
82igtl_uint64 igtl_export igtl_imgmeta_get_crc(igtl_imgmeta_element* metalist, int nitem);
83
84#ifdef __cplusplus
85}
86#endif
87
88#endif /* __IGTL_IMGMETA_H */
#define IGTL_IMGMETA_LEN_DEVICE_NAME
#define IGTL_IMGMETA_LEN_PATIENT_ID
#define IGTL_IMGMETA_LEN_MODALITY
#define IGTL_IMGMETA_LEN_NAME
void igtl_export igtl_imgmeta_convert_byte_order(igtl_imgmeta_element *metalist, int nitem)
#define IGTL_IMGMETA_LEN_PATIENT_NAME
igtl_uint64 igtl_export igtl_imgmeta_get_crc(igtl_imgmeta_element *metalist, int nitem)
#define igtl_export
igtl_uint64 timestamp

Generated for OpenIGTLink by Doxygen 1.9.8 written by Dimitri van Heesch, © 1997-2012