Main Page
Namespace List
Class Hierarchy
Alphabetical List
Compound List
File List
Namespace Members
Compound Members
File Members
Source
igtlCommon.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
16
Program: Open Image Guided Therapy Link Network Layer
17
Module: $RCSfile: igtlCommon.h,v $
18
Language: C++
19
Date: $Date: 2008-12-22 19:05:42 -0500 (Mon, 22 Dec 2008) $
20
Version: $Revision: 3460 $
21
22
Copyright (c) Insight Software Consortium. All rights reserved.
23
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
24
25
This software is distributed WITHOUT ANY WARRANTY; without even
26
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
27
PURPOSE. See the above copyright notices for more information.
28
29
=========================================================================*/
30
31
#ifndef __igtlCommon_h
32
#define __igtlCommon_h
33
34
#include <igtlConfigure.h>
35
#include <
igtl_header.h
>
36
37
namespace
igtl
38
{
41
static
int
IGTLProtocolToHeaderLookup
(
int
igtlProtocolVersion)
42
{
43
if
( igtlProtocolVersion == OpenIGTLink_PROTOCOL_VERSION_1 || igtlProtocolVersion == OpenIGTLink_PROTOCOL_VERSION_2 )
44
{
45
return
IGTL_HEADER_VERSION_1
;
46
}
47
else
if
( igtlProtocolVersion == OpenIGTLink_PROTOCOL_VERSION_3)
48
{
49
return
IGTL_HEADER_VERSION_2
;
50
}
51
else
52
{
53
// TODO : which error mechanism to use for error reporting
54
return
IGTL_HEADER_VERSION_1
;
55
}
56
}
57
}
58
59
#endif
igtl_header.h
IGTL_HEADER_VERSION_2
#define IGTL_HEADER_VERSION_2
Definition
igtl_header.h:19
IGTL_HEADER_VERSION_1
#define IGTL_HEADER_VERSION_1
Definition
igtl_header.h:18
igtl
The "igtl" namespace contains all OpenIGTLink classes. There are several nested namespaces within the...
Definition
igtlBindMessage.h:26
igtl::IGTLProtocolToHeaderLookup
static int IGTLProtocolToHeaderLookup(int igtlProtocolVersion)
Definition
igtlCommon.h:41
Generated for OpenIGTLink by
Doxygen
1.9.8 written by
Dimitri van Heesch
, © 1997-2012