15 #ifndef __igtlQuaternionTrackingDataMessage_h
16 #define __igtlQuaternionTrackingDataMessage_h
58 int SetName(
const char* name);
61 const char*
GetName() {
return this->m_Name.c_str(); };
64 int SetType(igtlUint8 type);
67 igtlUint8
GetType() {
return this->m_Type; };
70 void SetPosition(
float p[3]);
73 void GetPosition(
float p[3]);
76 void SetPosition(
float px,
float py,
float pz);
79 void GetPosition(
float* px,
float* py,
float* pz);
82 void SetQuaternion(
float q[4]);
85 void GetQuaternion(
float q[4]);
88 void SetQuaternion(
float qx,
float qy,
float qz,
float w);
91 void GetQuaternion(
float* qx,
float* qy,
float* qz,
float* w);
106 igtlFloat32 m_position[3];
109 igtlFloat32 m_quaternion[4];
135 int SetCoordinateName(
const char* name);
145 virtual int GetBodyPackSize();
146 virtual int PackBody();
147 virtual int UnpackBody();
177 virtual int PackBody() { AllocatePack();
return 1; };
202 void SetStatus(igtlUint8 status){ this->m_Status = status; }
215 virtual int GetBodyPackSize();
216 virtual int PackBody();
217 virtual int UnpackBody();
242 void ClearQuaternionTrackingDataElements();
245 int GetNumberOfQuaternionTrackingDataElements();
257 virtual int GetBodyPackSize();
258 virtual int PackBody();
259 virtual int UnpackBody();
269 #endif // _igtlQuaternionTrackingDataMessage_h
std::string m_Name
Name / description (< 20 bytes)
A class for the STT_QTDATA message type.
SmartPointer< Self > Pointer
std::vector< QuaternionTrackingDataElement::Pointer > m_QuaternionTrackingDataList
The list of trakcing data elements.
void SetStatus(igtlUint8 status)
Sets the status. 'status' must be either STATUS_SUCCESS or STATUS_ERROR.
#define igtlTypeMacro(thisClass, superclass)
SmartPointer< const Self > ConstPointer
SmartPointer< const Self > ConstPointer
~RTSQuaternionTrackingDataMessage()
igtlInt32 m_Resolution
Minimum time between two frames (ms). Use 0 for as fast as possible.
igtlInt32 GetResolution()
Gets the time resolution for streaming of QTDATA messages.
SmartPointer< const Self > ConstPointer
StopQuaternionTrackingDataMessage Self
StartQuaternionTrackingDataMessage Self
virtual int PackBody()
Packs (serialize) the body. Must be implemented in a child class.
void SetResolution(igtlInt32 res)
Sets the time resolution for streaming of QTDATA messages.
virtual int GetBodyPackSize()
Gets the size of the serialized body.
const char * GetCoordinateName()
Gets the name of the coordinate system.
igtlUint8 GetType()
Gets the type of the instrument/tracker.
virtual int UnpackBody()
Unpacks (deserialize) the body. Must be implemented in a child class.
RTSQuaternionTrackingDataMessage()
SmartPointer< Self > Pointer
std::string m_CoordinateName
Name of the coordinate system.
SmartPointer< const Self > ConstPointer
QuaternionTrackingDataElement Self
RTSQuaternionTrackingDataMessage Self
SmartPointer< Self > Pointer
igtlUint8 GetStatus()
Gets the status. The function returns either STATUS_SUCCESS or STATUS_ERROR.
QuaternionTrackingDataMessage Self
StopQuaternionTrackingDataMessage()
SmartPointer< Self > Pointer
igtlUint8 m_Type
Tracking data type (TYPE_TRACKER, TYPE_6D, TYPE_3D, TYPE_5D)
Base class for most igtl classes.
SmartPointer< Self > Pointer
~StopQuaternionTrackingDataMessage()
const char * GetName()
Gets the name of the instrument/tracker.
A class for the RTS_QTDATA message type.
SmartPointer< const Self > ConstPointer