Fraxinus
16.5.0-fx-rc9
An IGT application
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
igtl_us_status.h
Go to the documentation of this file.
1
/*=========================================================================
2
This file is part of CustusX, an Image Guided Therapy Application.
3
4
Copyright (c) 2008-2014, SINTEF Department of Medical Technology
5
All rights reserved.
6
7
Redistribution and use in source and binary forms, with or without
8
modification, are permitted provided that the following conditions are met:
9
10
1. Redistributions of source code must retain the above copyright notice,
11
this list of conditions and the following disclaimer.
12
13
2. Redistributions in binary form must reproduce the above copyright notice,
14
this list of conditions and the following disclaimer in the documentation
15
and/or other materials provided with the distribution.
16
17
3. Neither the name of the copyright holder nor the names of its contributors
18
may be used to endorse or promote products derived from this software
19
without specific prior written permission.
20
21
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
25
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
=========================================================================*/
32
/*
33
* igtl_us_status.h
34
*
35
* Created on: Apr 23, 2012
36
* Author: olevs
37
*/
38
39
#ifndef IGTL_US_STATUS_H_
40
#define IGTL_US_STATUS_H_
41
42
#include "igtl_win32header.h"
43
#include "igtl_types.h"
44
#include "igtl_win32header.h"
45
46
// 8 * 6 + 4 = 52
47
#define IGTL_US_STATUS_HEADER_SIZE 52 // Calculate number of bytes
48
49
#ifdef __cplusplus
50
extern
"C"
{
51
#endif
52
53
#pragma pack(1)
/* For 1-byte boundary in memroy */
54
55
typedef
struct
{
56
igtl_float64
originX
;
57
igtl_float64
originY
;
58
igtl_float64
originZ
;
59
igtl_float64
depthStart
;
60
igtl_float64
depthEnd
;
61
igtl_float64
width
;
62
igtl_int32
probeType
;
63
// igtl_string dataFormat;
64
}
igtl_us_status_message
;
65
66
#pragma pack()
67
68
/*
69
* String data size
70
*
71
* This function calculates size of the pixel array, which will be
72
* transferred with the specified header.
73
*/
74
75
//igtl_uint32 igtl_export igtl_us_status_get_length(igtl_us_status_header * header);
76
77
/*
78
* Byte order conversion
79
*
80
* This function converts endianness from host byte order to network byte order,
81
* or vice versa.
82
* NOTE: It is developer's responsibility to have the string body with BOM
83
* (byte order mark) or in big endian ordrer.
84
*/
85
86
void
igtl_export
igtl_us_status_convert_byte_order
(
igtl_us_status_message
* message);
87
88
/*
89
* CRC calculation
90
*
91
* This function calculates CRC of image data body including header
92
* and array of pixel data.
93
*
94
*/
95
96
igtl_uint64 igtl_export
igtl_us_status_get_crc
(
igtl_us_status_message
* message);
97
98
#ifdef __cplusplus
99
}
100
#endif
101
102
#endif
/* IGTL_US_STATUS_H_ */
igtl_us_status_get_crc
igtl_uint64 igtl_export igtl_us_status_get_crc(igtl_us_status_message *message)
Definition:
igtl_us_status.c:45
igtl_us_status_message::originX
igtl_float64 originX
Definition:
igtl_us_status.h:56
igtl_us_status_message::depthEnd
igtl_float64 depthEnd
Definition:
igtl_us_status.h:60
igtl_us_status_message
Definition:
igtl_us_status.h:55
igtl_us_status_message::originZ
igtl_float64 originZ
Definition:
igtl_us_status.h:58
igtl_us_status_message::depthStart
igtl_float64 depthStart
Definition:
igtl_us_status.h:59
igtl_us_status_message::probeType
igtl_int32 probeType
Definition:
igtl_us_status.h:62
igtl_us_status_message::width
igtl_float64 width
Definition:
igtl_us_status.h:61
igtl_us_status_message::originY
igtl_float64 originY
Definition:
igtl_us_status.h:57
igtl_us_status_convert_byte_order
void igtl_export igtl_us_status_convert_byte_order(igtl_us_status_message *message)
Definition:
igtl_us_status.c:25
CX
source
resource
OpenIGTLinkUtilities
igtl_us_status.h
Generated on Thu May 19 2016 11:15:34 for Fraxinus by
1.8.6