Main Page
Namespace List
Class Hierarchy
Alphabetical List
Compound List
File List
Namespace Members
Compound Members
File Members
Source
igtlTransformMessage.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 __igtlTransformMessage_h
16
#define __igtlTransformMessage_h
17
18
#include "
igtlObject.h
"
19
#include "
igtlMath.h
"
20
#include "
igtlMessageBase.h
"
21
22
namespace
igtl
23
{
24
26
class
IGTLCommon_EXPORT
GetTransformMessage
:
public
HeaderOnlyMessageBase
27
{
28
public
:
29
typedef
GetTransformMessage
Self
;
30
typedef
HeaderOnlyMessageBase
Superclass
;
31
typedef
SmartPointer<Self>
Pointer
;
32
typedef
SmartPointer<const Self>
ConstPointer
;
33
34
igtlTypeMacro
(
igtl::GetTransformMessage
,
igtl::HeaderOnlyMessageBase
);
35
igtlNewMacro
(
igtl::GetTransformMessage
);
36
37
protected
:
38
GetTransformMessage
() :
HeaderOnlyMessageBase
() { this->m_DefaultBodyType =
"GET_TRANS"
; };
39
~GetTransformMessage
() {};
40
};
41
42
43
50
class
IGTLCommon_EXPORT
TransformMessage
:
public
MessageBase
51
{
52
53
public
:
54
55
typedef
TransformMessage
Self
;
56
typedef
MessageBase
Superclass
;
57
typedef
SmartPointer<Self>
Pointer
;
58
typedef
SmartPointer<const Self>
ConstPointer
;
59
60
igtlTypeMacro
(
igtl::TransformMessage
,
igtl::MessageBase
);
61
igtlNewMacro
(
igtl::TransformMessage
);
62
63
public
:
64
66
void
SetPosition
(
float
p[3]);
67
69
void
GetPosition
(
float
p[3]);
70
72
void
SetPosition
(
float
px,
float
py,
float
pz);
73
75
void
GetPosition
(
float
* px,
float
* py,
float
* pz);
76
78
void
SetNormals
(
float
o[3][3]);
79
81
void
GetNormals
(
float
o[3][3]);
82
84
void
SetNormals
(
float
t[3],
float
s[3],
float
n[3]);
85
87
void
GetNormals
(
float
t[3],
float
s[3],
float
n[3]);
88
90
void
SetMatrix
(Matrix4x4& mat);
91
93
void
GetMatrix
(Matrix4x4& mat);
94
95
96
protected
:
97
TransformMessage
();
98
~TransformMessage
();
99
100
protected
:
101
102
virtual
int
GetBodyPackSize
();
103
virtual
int
PackBody
();
104
virtual
int
UnpackBody
();
105
107
Matrix4x4
matrix
;
108
110
unsigned
char
*
m_Transform
;
111
112
};
113
114
115
}
// namespace igtl
116
117
#endif
// _igtlTransformMessage_h
118
119
120
igtl::GetTransformMessage
A class for the GET_TRANS message type.
Definition
igtlTransformMessage.h:27
igtl::GetTransformMessage::~GetTransformMessage
~GetTransformMessage()
Definition
igtlTransformMessage.h:39
igtl::GetTransformMessage::igtlNewMacro
igtlNewMacro(igtl::GetTransformMessage)
igtl::GetTransformMessage::GetTransformMessage
GetTransformMessage()
Definition
igtlTransformMessage.h:38
igtl::GetTransformMessage::ConstPointer
SmartPointer< const Self > ConstPointer
Definition
igtlTransformMessage.h:32
igtl::GetTransformMessage::Self
GetTransformMessage Self
Definition
igtlTransformMessage.h:29
igtl::GetTransformMessage::Pointer
SmartPointer< Self > Pointer
Definition
igtlTransformMessage.h:31
igtl::GetTransformMessage::igtlTypeMacro
igtlTypeMacro(igtl::GetTransformMessage, igtl::HeaderOnlyMessageBase)
igtl::GetTransformMessage::Superclass
HeaderOnlyMessageBase Superclass
Definition
igtlTransformMessage.h:30
igtl::HeaderOnlyMessageBase
A class for header-only message types, which are used for quearying.
Definition
igtlMessageBase.h:222
igtl::MessageBase
Definition
igtlMessageBase.h:56
igtl::SmartPointer
Implements transparent reference counting.
Definition
igtlSmartPointer.h:57
igtl::TransformMessage
Definition
igtlTransformMessage.h:51
igtl::TransformMessage::SetPosition
void SetPosition(float px, float py, float pz)
Sets a position (or a translation vector) in the RAS coordinate system.
igtl::TransformMessage::~TransformMessage
~TransformMessage()
igtl::TransformMessage::SetPosition
void SetPosition(float p[3])
Sets a position (or a translation vector) in the RAS coordinate system.
igtl::TransformMessage::GetMatrix
void GetMatrix(Matrix4x4 &mat)
Sets rotation matrix using igtl::Matrix4x4.
igtl::TransformMessage::GetPosition
void GetPosition(float p[3])
Gets a position (or a translation vector) in the RAS coordinate system.
igtl::TransformMessage::GetNormals
void GetNormals(float t[3], float s[3], float n[3])
Gets normal vectors (or a rotation matrix) in the RAS coordinate system.
igtl::TransformMessage::UnpackBody
virtual int UnpackBody()
Unpacks (deserialize) the body. Must be implemented in a child class.
igtl::TransformMessage::SetMatrix
void SetMatrix(Matrix4x4 &mat)
Sets rotation matrix using igtl::Matrix4x4.
igtl::TransformMessage::PackBody
virtual int PackBody()
Packs (serialize) the body. Must be implemented in a child class.
igtl::TransformMessage::SetNormals
void SetNormals(float o[3][3])
Sets normal vectors (or a rotation matrix) in the RAS coordinate system.
igtl::TransformMessage::TransformMessage
TransformMessage()
igtl::TransformMessage::m_Transform
unsigned char * m_Transform
The byte array for the serialized transform data.
Definition
igtlTransformMessage.h:110
igtl::TransformMessage::ConstPointer
SmartPointer< const Self > ConstPointer
Definition
igtlTransformMessage.h:58
igtl::TransformMessage::SetNormals
void SetNormals(float t[3], float s[3], float n[3])
Sets normal vectors (or a rotation matrix) in the RAS coordinate system.
igtl::TransformMessage::GetNormals
void GetNormals(float o[3][3])
Gets normal vectors (or a rotation matrix) in the RAS coordinate system.
igtl::TransformMessage::GetBodyPackSize
virtual int GetBodyPackSize()
Gets the size of the serialized body.
igtl::TransformMessage::Pointer
SmartPointer< Self > Pointer
Definition
igtlTransformMessage.h:57
igtl::TransformMessage::Superclass
MessageBase Superclass
Definition
igtlTransformMessage.h:56
igtl::TransformMessage::GetPosition
void GetPosition(float *px, float *py, float *pz)
Gets a position (or a translation vector) in the RAS coordinate system.
igtl::TransformMessage::igtlNewMacro
igtlNewMacro(igtl::TransformMessage)
igtl::TransformMessage::matrix
Matrix4x4 matrix
The transformation matrix.
Definition
igtlTransformMessage.h:107
igtl::TransformMessage::Self
TransformMessage Self
Definition
igtlTransformMessage.h:55
igtl::TransformMessage::igtlTypeMacro
igtlTypeMacro(igtl::TransformMessage, igtl::MessageBase)
igtlMath.h
igtlMessageBase.h
igtlObject.h
IGTLCommon_EXPORT
#define IGTLCommon_EXPORT
Definition
igtlWin32Header.h:151
igtl
The "igtl" namespace contains all OpenIGTLink classes. There are several nested namespaces within the...
Definition
igtlBindMessage.h:26
igtl::Matrix4x4
float Matrix4x4[4][4]
Definition
igtlMath.h:23
Generated for OpenIGTLink by
Doxygen
1.9.8 written by
Dimitri van Heesch
, © 1997-2012