14#ifndef mitkIGTLMessage_h
15#define mitkIGTLMessage_h
17#include <itkDataObject.h>
18#include "MitkOpenIGTLinkExports.h"
19#include <mitkNumericTypes.h>
20#include <mitkCommon.h>
22#include "igtlMessageBase.h"
35 class MITKOPENIGTLINK_EXPORT
IGTLMessage :
public itk::DataObject
51 void SetMessage(igtl::MessageBase::Pointer msg);
59 virtual bool IsDataValid()
const;
88 void Graft(
const DataObject *data)
override;
95 void CopyInformation(
const DataObject* data)
override;
102 void PrintSelf(std::ostream& os, itk::Indent indent)
const override;
104 std::string ToString()
const;
116 void Compose(
const mitk::IGTLMessage::Pointer n,
const bool pre =
false);
120 const char* GetIGTLMessageType()
const;
122 template <
typename IGTLMessageType > IGTLMessageType* GetMessage()
const;
162 static mitk::IGTLMessage::Pointer getComposition(
163 const mitk::IGTLMessage::Pointer nd1,
164 const mitk::IGTLMessage::Pointer nd2);
191 ScalarType eps = mitk::eps,
192 bool verbose =
false );
A wrapper for the OpenIGTLink message type.
igtl::MessageBase::Pointer m_Message
holds the actual OpenIGTLink message
itkSetMacro(DataValid, bool)
sets the dataValid flag of the IGTLMessage object indicating if the object contains valid data
itkGetConstMacro(IGTTimeStamp, TimeStampType)
gets the IGT timestamp of the IGTLMessage object
double TimeStampType
type that holds the time at which the data was recorded in milliseconds
itkFactorylessNewMacro(Self)
void Compose(const mitk::IGTLMessage::Pointer n, const bool pre=false)
itkGetStringMacro(Name)
returns the name of the IGTLMessage object
std::string m_Name
name of the navigation data
itkSetStringMacro(Name)
set the name of the IGTLMessage object
itkGetConstMacro(Message, igtl::MessageBase::Pointer)
returns the OpenIGTLink message
mitkClassMacroItkParent(IGTLMessage, itk::DataObject)
TimeStampType m_IGTTimeStamp
contains the time at which the tracking data was recorded
bool m_DataValid
defines if the object contains valid values
mitkNewMacro1Param(Self, igtl::MessageBase::Pointer)
Time stamp in milliseconds.
MITKIGTBASE_EXPORT bool Equal(const mitk::NavigationData &leftHandSide, const mitk::NavigationData &rightHandSide, ScalarType eps=mitk::eps, bool verbose=false)
Equal A function comparing two navigation data objects for beeing equal in meta- and imagedata.