Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  
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
22namespace igtl
23{
24
41
42
43
51{
52
53public:
54
59
62
63public:
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
96protected:
99
100protected:
101
102 virtual int GetBodyPackSize();
103 virtual int PackBody();
104 virtual int UnpackBody();
105
108
110 unsigned char* m_Transform;
111
112};
113
114
115} // namespace igtl
116
117#endif // _igtlTransformMessage_h
118
119
120
A class for the GET_TRANS message type.
igtlNewMacro(igtl::GetTransformMessage)
SmartPointer< const Self > ConstPointer
igtlTypeMacro(igtl::GetTransformMessage, igtl::HeaderOnlyMessageBase)
HeaderOnlyMessageBase Superclass
A class for header-only message types, which are used for quearying.
Implements transparent reference counting.
void SetPosition(float px, float py, float pz)
Sets a position (or a translation vector) in the RAS coordinate system.
void SetPosition(float p[3])
Sets a position (or a translation vector) in the RAS coordinate system.
void GetMatrix(Matrix4x4 &mat)
Sets rotation matrix using igtl::Matrix4x4.
void GetPosition(float p[3])
Gets a position (or a translation vector) in the RAS coordinate system.
void GetNormals(float t[3], float s[3], float n[3])
Gets normal vectors (or a rotation matrix) in the RAS coordinate system.
virtual int UnpackBody()
Unpacks (deserialize) the body. Must be implemented in a child class.
void SetMatrix(Matrix4x4 &mat)
Sets rotation matrix using igtl::Matrix4x4.
virtual int PackBody()
Packs (serialize) the body. Must be implemented in a child class.
void SetNormals(float o[3][3])
Sets normal vectors (or a rotation matrix) in the RAS coordinate system.
unsigned char * m_Transform
The byte array for the serialized transform data.
SmartPointer< const Self > ConstPointer
void SetNormals(float t[3], float s[3], float n[3])
Sets normal vectors (or a rotation matrix) in the RAS coordinate system.
void GetNormals(float o[3][3])
Gets normal vectors (or a rotation matrix) in the RAS coordinate system.
virtual int GetBodyPackSize()
Gets the size of the serialized body.
SmartPointer< Self > Pointer
void GetPosition(float *px, float *py, float *pz)
Gets a position (or a translation vector) in the RAS coordinate system.
igtlNewMacro(igtl::TransformMessage)
Matrix4x4 matrix
The transformation matrix.
igtlTypeMacro(igtl::TransformMessage, igtl::MessageBase)
#define IGTLCommon_EXPORT
The "igtl" namespace contains all OpenIGTLink classes. There are several nested namespaces within the...
float Matrix4x4[4][4]
Definition igtlMath.h:23

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