15#ifndef __igtlTrackingDataMessage_h
16#define __igtlTrackingDataMessage_h
59 const char*
GetName() {
return this->m_Name.c_str(); };
65 igtlUint8
GetType() {
return this->m_Type; };
166 virtual int PackBody() { AllocatePack();
return 1; };
191 void SetStatus(igtlUint8 status){ this->m_Status = status; }
Base class for most igtl classes.
A class for the RTS_TDATA message type.
igtlTypeMacro(igtl::RTSTrackingDataMessage, igtl::MessageBase)
virtual int UnpackBody()
Unpacks (deserialize) the body. Must be implemented in a child class.
igtlNewMacro(igtl::RTSTrackingDataMessage)
virtual int PackBody()
Packs (serialize) the body. Must be implemented in a child class.
igtlUint8 GetStatus()
Gets the status. The function returns either STATUS_SUCCESS or STATUS_ERROR.
igtlUint8 m_Status
A variable to store the status.
~RTSTrackingDataMessage()
RTSTrackingDataMessage Self
virtual int GetBodyPackSize()
Gets the size of the serialized body.
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
void SetStatus(igtlUint8 status)
Sets the status. 'status' must be either STATUS_SUCCESS or STATUS_ERROR.
Implements transparent reference counting.
A class for the STT_TDATA message type.
virtual int GetBodyPackSize()
Gets the size of the serialized body.
SmartPointer< const Self > ConstPointer
virtual int PackBody()
Packs (serialize) the body. Must be implemented in a child class.
const char * GetCoordinateName()
Gets the name of the coordinate system.
void SetResolution(igtlInt32 res)
Sets the time resolution for streaming of QTDATA messages.
SmartPointer< Self > Pointer
virtual int UnpackBody()
Unpacks (deserialize) the body. Must be implemented in a child class.
igtlInt32 m_Resolution
Minimum time between two frames (ms). Use 0 for as fast as possible.
igtlTypeMacro(igtl::StartTrackingDataMessage, igtl::MessageBase)
StartTrackingDataMessage()
~StartTrackingDataMessage()
igtlInt32 GetResolution()
Gets the time resolution for streaming of QTDATA messages.
std::string m_CoordinateName
Name of the coordinate system.
StartTrackingDataMessage Self
igtlNewMacro(igtl::StartTrackingDataMessage)
int SetCoordinateName(const char *name)
Sets the name of the coordinate system. The name must be defined by the user.
A class for the STP_TDATA message type.
SmartPointer< Self > Pointer
virtual int PackBody()
Packs (serialize) the body. Must be implemented in a child class.
virtual int GetBodyPackSize()
Gets the size of the serialized body.
igtlNewMacro(igtl::StopTrackingDataMessage)
StopTrackingDataMessage Self
StopTrackingDataMessage()
SmartPointer< const Self > ConstPointer
igtlTypeMacro(igtl::StopTrackingDataMessage, igtl::MessageBase)
virtual int UnpackBody()
Unpacks (deserialize) the body. Must be implemented in a child class.
~StopTrackingDataMessage()
void SetMatrix(Matrix4x4 &mat)
Sets the 4-by-4 transformation matrix.
SmartPointer< const Self > ConstPointer
igtlNewMacro(igtl::TrackingDataElement)
int SetType(igtlUint8 type)
Sets the type of the instrument/tracker.
Matrix4x4 m_Matrix
Transform matrix.
int SetName(const char *name)
Sets the name of the instrument/tracker.
igtlTypeMacro(igtl::TrackingDataElement, igtl::Object)
SmartPointer< Self > Pointer
std::string m_Name
Name / description (< 20 bytes.
igtlUint8 m_Type
Tracking data type (TYPE_TRACKER, TYPE_6D, TYPE_3D, TYPE_5D)
const char * GetName()
Gets the name of the instrument/tracker.
igtlUint8 GetType()
Gets the type of the instrument/tracker.
void GetPosition(float p[3])
Gets the position. The function substitutes 3-element array of x, y and z coordinates in 'p'.
void GetMatrix(Matrix4x4 &mat)
Gets the 4-by-4 transformation matrix.
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'.
void SetPosition(float p[3])
Sets the position by 3-element array of x, y, and z coordinates.
int AddTrackingDataElement(TrackingDataElement::Pointer &elem)
Adds tracking data element.
igtlTypeMacro(igtl::TrackingDataMessage, igtl::MessageBase)
virtual int GetBodyPackSize()
Gets the size of the serialized body.
std::vector< TrackingDataElement::Pointer > m_TrackingDataList
The list of trakcing data elements.
igtlNewMacro(igtl::TrackingDataMessage)
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
virtual int UnpackBody()
Unpacks (deserialize) the body. Must be implemented in a child class.
void GetTrackingDataElement(int index, TrackingDataElement::Pointer &elem)
Gets the tracking data element specified by 'index'.
int GetNumberOfTrackingDataElement()
void ClearTrackingDataElements()
Clears the all tracking data element in the list.
int GetNumberOfTrackingDataElements()
Gets the number of tracking data elements in the list.
virtual int PackBody()
Packs (serialize) the body. Must be implemented in a child class.
The "igtl" namespace contains all OpenIGTLink classes. There are several nested namespaces within the...