15#ifndef __igtlQuaternionTrackingDataMessage_h
16#define __igtlQuaternionTrackingDataMessage_h
61 const char*
GetName() {
return this->m_Name.c_str(); };
67 igtlUint8
GetType() {
return this->m_Type; };
106 igtlFloat32 m_position[3];
109 igtlFloat32 m_quaternion[4];
201 void SetStatus(igtlUint8 status){ this->m_Status = status; }
Base class for most igtl classes.
igtlTypeMacro(igtl::QuaternionTrackingDataElement, igtl::Object)
int SetName(const char *name)
Sets the name of the instrument/tracker.
QuaternionTrackingDataElement()
void GetQuaternion(float q[4])
Gets the quaternion. The function substitutes the array of elements of the quaternion in 'q'.
SmartPointer< const Self > ConstPointer
const char * GetName()
Gets the name of the instrument/tracker.
int SetType(igtlUint8 type)
Sets the type of the instrument/tracker.
igtlUint8 m_Type
Tracking data type (TYPE_TRACKER, TYPE_6D, TYPE_3D, TYPE_5D)
igtlNewMacro(igtl::QuaternionTrackingDataElement)
void SetQuaternion(float qx, float qy, float qz, float w)
Sets the quaternion by elements of the quaternion (x, y, z and w).
QuaternionTrackingDataElement Self
igtlUint8 GetType()
Gets the type of the instrument/tracker.
void GetQuaternion(float *qx, float *qy, float *qz, float *w)
Gets the quaternion. The function substitutes the elements of the quaternion in 'qx',...
void SetPosition(float px, float py, float pz)
Sets the position by x, y, and z coordinates.
void GetPosition(float *px, float *py, float *pz)
Gets the position. The function substitutes the xyz coordinates in 'px', 'py', and 'pz'.
SmartPointer< Self > Pointer
void GetPosition(float p[3])
Gets the position. The function substitutes 3-element array of x, y and z coordinates in 'p'.
~QuaternionTrackingDataElement()
std::string m_Name
Name / description (< 20 bytes)
void SetQuaternion(float q[4])
Sets the quaternion by 4-element array.
void SetPosition(float p[3])
Sets the position by 3-element array of x, y, and z coordinates.
QuaternionTrackingDataMessage Self
int AddQuaternionTrackingDataElement(QuaternionTrackingDataElement::Pointer &elem)
Adds tracking data element.
virtual int CalculateContentBufferSize()
Gets the size of the serialized content.
void GetQuaternionTrackingDataElement(int index, QuaternionTrackingDataElement::Pointer &elem)
Gets the tracking data element specified by 'index'.
int GetNumberOfQuaternionTrackingDataElements()
Gets the number of tracking data elements in the list.
std::vector< QuaternionTrackingDataElement::Pointer > m_QuaternionTrackingDataList
The list of tracking data elements.
~QuaternionTrackingDataMessage()
virtual int PackContent()
Packs (serialize) the content. Must be implemented in all child classes.
igtlTypeMacro(igtl::QuaternionTrackingDataMessage, igtl::MessageBase)
QuaternionTrackingDataMessage()
SmartPointer< Self > Pointer
igtlNewMacro(igtl::QuaternionTrackingDataMessage)
void ClearQuaternionTrackingDataElements()
Clears the all tracking data element in the list.
SmartPointer< const Self > ConstPointer
virtual int UnpackContent()
Unpacks (deserialize) the content. Must be implemented in all child classes.
A class for the RTS_QTDATA message type.
virtual int CalculateContentBufferSize()
Gets the size of the serialized content.
void SetStatus(igtlUint8 status)
Sets the status. 'status' must be either STATUS_SUCCESS or STATUS_ERROR.
SmartPointer< const Self > ConstPointer
igtlUint8 m_Status
A variable to store the status.
SmartPointer< Self > Pointer
igtlNewMacro(igtl::RTSQuaternionTrackingDataMessage)
RTSQuaternionTrackingDataMessage Self
~RTSQuaternionTrackingDataMessage()
virtual int PackContent()
Packs (serialize) the content. Must be implemented in all child classes.
igtlTypeMacro(igtl::RTSQuaternionTrackingDataMessage, igtl::MessageBase)
RTSQuaternionTrackingDataMessage()
igtlUint8 GetStatus()
Gets the status. The function returns either STATUS_SUCCESS or STATUS_ERROR.
virtual int UnpackContent()
Unpacks (deserialize) the content. Must be implemented in all child classes.
Implements transparent reference counting.
A class for the STT_QTDATA message type.
igtlNewMacro(igtl::StartQuaternionTrackingDataMessage)
StartQuaternionTrackingDataMessage Self
SmartPointer< Self > Pointer
const char * GetCoordinateName()
Gets the name of the coordinate system.
StartQuaternionTrackingDataMessage()
SmartPointer< const Self > ConstPointer
void SetResolution(igtlInt32 res)
Sets the time resolution for streaming of QTDATA messages.
igtlTypeMacro(igtl::StartQuaternionTrackingDataMessage, igtl::MessageBase)
virtual int PackContent()
Packs (serialize) the content. Must be implemented in all child classes.
int SetCoordinateName(const char *name)
Sets the name of the coordinate system. The name must be defined by the user.
~StartQuaternionTrackingDataMessage()
std::string m_CoordinateName
Name of the coordinate system.
virtual int UnpackContent()
Unpacks (deserialize) the content. Must be implemented in all child classes.
virtual int CalculateContentBufferSize()
Gets the size of the serialized content.
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< Self > Pointer
~StopQuaternionTrackingDataMessage()
virtual int UnpackContent()
Unpacks (deserialize) the content. Must be implemented in all child classes.
StopQuaternionTrackingDataMessage Self
virtual int CalculateContentBufferSize()
Gets the size of the serialized content.
igtlTypeMacro(igtl::StopQuaternionTrackingDataMessage, igtl::MessageBase)
SmartPointer< const Self > ConstPointer
virtual int PackContent()
Packs (serialize) the content. Must be implemented in all child classes.
igtlNewMacro(igtl::StopQuaternionTrackingDataMessage)
StopQuaternionTrackingDataMessage()
The "igtl" namespace contains all OpenIGTLink classes. There are several nested namespaces within the...