15 #ifndef __igtlTrajectoryMessage_h
16 #define __igtlTrajectoryMessage_h
47 TYPE_ENTRY_TARGET = 3,
53 int SetName(
const char* name);
56 const char*
GetName() {
return this->m_Name.c_str(); };
59 int SetGroupName(
const char* grpname);
65 int SetType(igtlUint8 type);
67 igtlUint8
GetType() {
return this->m_Type; };
70 void SetRGBA(igtlUint8 rgba[4]);
73 void SetRGBA(igtlUint8 r, igtlUint8 g, igtlUint8 b, igtlUint8 a);
76 void GetRGBA(igtlUint8* rgba);
79 void GetRGBA(igtlUint8& r, igtlUint8& g, igtlUint8& b, igtlUint8& a);
82 void SetEntryPosition(igtlFloat32 position[3]);
85 void SetEntryPosition(igtlFloat32 x, igtlFloat32 y, igtlFloat32 z);
88 void GetEntryPosition(igtlFloat32* position);
91 void GetEntryPosition(igtlFloat32& x, igtlFloat32& y, igtlFloat32& z);
94 void SetTargetPosition(igtlFloat32 position[3]);
97 void SetTargetPosition(igtlFloat32 x, igtlFloat32 y, igtlFloat32 z);
100 void GetTargetPosition(igtlFloat32* position);
103 void GetTargetPosition(igtlFloat32& x, igtlFloat32& y, igtlFloat32& z);
106 void SetRadius(igtlFloat32 radius) { this->m_Radius = radius; };
112 int SetOwner(
const char* owner);
115 const char*
GetOwner() {
return this->m_Owner.c_str(); };
136 igtlFloat32 m_EntryPosition[3];
139 igtlFloat32 m_TargetPosition[3];
166 virtual int PackBody() { AllocatePack();
return 1; };
193 int GetNumberOfTrajectoryElement();
205 virtual int GetBodyPackSize();
206 virtual int PackBody();
207 virtual int UnpackBody();
217 #endif // _igtlTrajectoryMessage_h
SmartPointer< const Self > ConstPointer
virtual int UnpackBody()
Unpacks (deserialize) the body. Must be implemented in a child class.
std::string m_Owner
Device name of the ower image.
#define igtlTypeMacro(thisClass, superclass)
igtlFloat32 GetRadius()
Gets the radius.
virtual int GetBodyPackSize()
Gets the size of the serialized body.
SmartPointer< Self > Pointer
std::string m_Name
name / description (< 64 bytes)
igtlFloat32 m_Radius
Radius of the trajectory. Can be 0.
SmartPointer< Self > Pointer
igtlUint8 m_Type
Trajectory type (see TYPE_* constants)
SmartPointer< const Self > ConstPointer
igtlUint8 GetType()
Gets the trajectory type. The returned value is either TYPE_ENTRY_ONLY, TYPE_TARGET_ONLY, or TYPE_ENTRY_TARGET.
GetTrajectoryMessage Self
A class for the GET_TRAJ message type.
SmartPointer< Self > Pointer
std::string m_GroupName
Can be "Labeled Trajectory", "Landmark", Fiducial", ...
TrajectoryElement class is used to manage a trajectory in TrajectoryMessage class.
const char * GetName()
Gets the name of the trajectory.
virtual int PackBody()
Packs (serialize) the body. Must be implemented in a child class.
std::vector< TrajectoryElement::Pointer > m_TrajectoryList
A list of pointers to the trajectories.
const char * GetGroupName()
Gets the group name.
void SetRadius(igtlFloat32 radius)
Sets the radius.
Base class for most igtl classes.
const char * GetOwner()
Gets the owner of the trajectory.
SmartPointer< const Self > ConstPointer