CustusX  2023.01.05-dev+develop.0da12
An IGT application
cxGrabberSenderQTcpSocket.h
Go to the documentation of this file.
1 /*=========================================================================
2 This file is part of CustusX, an Image Guided Therapy Application.
3 
4 Copyright (c) SINTEF Department of Medical Technology.
5 All rights reserved.
6 
7 CustusX is released under a BSD 3-Clause license.
8 
9 See Lisence.txt (https://github.com/SINTEFMedtek/CustusX/blob/master/License.txt) for details.
10 =========================================================================*/
11 
12 #ifndef CXGrabberSenderQTcpSocket_H_
13 #define CXGrabberSenderQTcpSocket_H_
14 
15 #include "cxGrabberExport.h"
16 
17 #include "cxSenderImpl.h"
18 
19 #include <QObject>
20 #include <boost/shared_ptr.hpp>
21 #include <qtcpsocket.h>
22 #include "igtlImageMessage.h"
23 #include "cxIGTLinkImageMessage.h"
25 #include "cxImage.h"
26 #include "cxTool.h"
27 
28 namespace cx
29 {
30 
37 class cxGrabber_EXPORT GrabberSenderQTcpSocket : public SenderImpl
38 {
39 public:
40  explicit GrabberSenderQTcpSocket(QTcpSocket* socket);
42 
43  bool isReady() const;
44 
45 protected:
46  virtual void send(igtl::ImageMessage::Pointer msg);
47  virtual void send(IGTLinkUSStatusMessage::Pointer msg);
48  virtual void send(ImagePtr msg);
49  virtual void send(ProbeDefinitionPtr msg);
50 
51 private:
52  QTcpSocket* mSocket;
53  int mMaxBufferSize;
54 };
55 
60 } /* namespace cx */
61 #endif /* CXGrabberSenderQTcpSocket__H_ */
boost::shared_ptr< class Image > ImagePtr
Definition: cxDicomWidget.h:27
boost::shared_ptr< class ProbeDefinition > ProbeDefinitionPtr
Namespace for all CustusX production code.