14 #ifndef mitkIGTLMessage_h
15 #define mitkIGTLMessage_h
17 #include <itkDataObject.h>
18 #include "MitkOpenIGTLinkExports.h"
22 #include "igtlMessageBase.h"
35 class MITKOPENIGTLINK_EXPORT
IGTLMessage :
public itk::DataObject
39 itkFactorylessNewMacro(Self);
51 void SetMessage(igtl::MessageBase::Pointer msg);
55 itkGetConstMacro(
Message, igtl::MessageBase::Pointer);
59 virtual bool IsDataValid()
const;
64 itkSetMacro(DataValid,
bool);
72 itkSetStringMacro(Name);
76 itkGetStringMacro(Name);
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);
192 bool verbose =
false );