34 #ifndef CXOPENIGTLINKPROTOCOL_H
35 #define CXOPENIGTLINKPROTOCOL_H
40 #include "igtlMessageHeader.h"
41 #include "igtlPolyDataMessage.h"
42 #include "igtlTransformMessage.h"
43 #include "igtlImageMessage.h"
44 #include "igtlStatusMessage.h"
45 #include "igtlStringMessage.h"
49 #define CX_OPENIGTLINK_CHANNEL_NAME "OpenIGTLink"
67 virtual void translate(
const igtl::MessageHeader::Pointer &header,
const igtl::MessageBase::Pointer &body);
68 virtual void translate(
const igtl::TransformMessage::Pointer body);
69 virtual void translate(
const igtl::ImageMessage::Pointer body);
70 virtual void translate(
const igtl::PolyDataMessage::Pointer body);
71 virtual void translate(
const igtl::StatusMessage::Pointer body);
72 virtual void translate(
const igtl::StringMessage::Pointer body);
80 virtual bool doCRC()
const;
86 igtl::MessageHeader::Pointer mHeader;
87 igtl::MessageBase::Pointer mBody;
90 void setReadyToReceive(
bool ready);
92 void prepareHeader(
const igtl::MessageHeader::Pointer &header)
const;
93 void prepareBody(
const igtl::MessageBase::Pointer &header, igtl::MessageBase::Pointer &body);
95 void prepareBody(
const igtl::MessageHeader::Pointer &header, igtl::MessageBase::Pointer &body);
96 void prepareHeaderPack(igtl::MessageHeader::Pointer &message);
97 void prepareBodyPack(igtl::MessageBase::Pointer &message);
98 bool unpackHeader(
const igtl::MessageBase::Pointer &header)
const;
99 bool unpackBody(
const igtl::MessageBase::Pointer &body);
100 void getReadyToReceiveBody();
101 void getReadyToReceiveHeader();
102 bool isValid(
const igtl::MessageBase::Pointer &msg)
const;
103 bool isSupportedBodyType(QString type)
const;
109 #endif // CXOPENIGTLINKPROTOCOL_H
virtual ~OpenIGTLinkProtocol()
boost::shared_ptr< class Image > ImagePtr
boost::shared_ptr< EncodedPackage > EncodedPackagePtr
void image(ImagePtr image)
virtual EncodedPackagePtr encode(ImagePtr image)
virtual bool doCRC() const
virtual PATIENT_COORDINATE_SYSTEM coordinateSystem() const
void writeNotSupportedMessage(igtl::MessageBase *body) const
pcsLPS
Left-Posterior-Superior, used internally by CustusX, also DICOM, ITK.
void writeAcceptingMessage(igtl::MessageBase *body) const
igtl::SmartPointer< Self > Pointer
virtual bool readyToReceiveData()
boost::shared_ptr< class Mesh > MeshPtr
virtual void translate(const igtl::MessageHeader::Pointer &header, const igtl::MessageBase::Pointer &body)