Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
QmitkIGTLStreamingConnector.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef QMITKIGTLSTREAMINGCONNECTOR_H
14 #define QMITKIGTLSTREAMINGCONNECTOR_H
15 
16 //QT headers
17 #include <QTimer>
18 
19 //mitk headers
20 #include "MitkOpenIGTLinkUIExports.h"
21 #include "mitkIGTLMessageSource.h"
23 
35 class MITKOPENIGTLINKUI_EXPORT QmitkIGTLStreamingConnector : public QObject
36 {
37  Q_OBJECT
38 
39  public:
40  static const std::string VIEW_ID;
41 
42  QmitkIGTLStreamingConnector(QObject* parent = nullptr);
43  ~QmitkIGTLStreamingConnector() override;
44 
48  void Initialize(mitk::IGTLMessageSource::Pointer msgSource,
49  mitk::IGTLMessageProvider::Pointer msgProvider);
50 
51  protected slots:
55  void OnCheckFPS();
59  void OnUpdateSource();
60 
61  protected:
63  mitk::IGTLMessageSource::Pointer m_IGTLMessageSource;
64 
68  mitk::IGTLMessageProvider::Pointer m_IGTLMessageProvider;
69 
75 
80 
81  static const unsigned int MILISECONDS_BETWEEN_FPS_CHECK;
82 };
83 #endif
This class is used to stream messages from a IGTL message source into the sending queue of a message ...
mitk::IGTLMessageProvider::Pointer m_IGTLMessageProvider
holds the message provider that will send the stream data from the source
mitk::IGTLMessageSource::Pointer m_IGTLMessageSource
holds the message source that has to stream its data
static const unsigned int MILISECONDS_BETWEEN_FPS_CHECK
QTimer m_CheckFPSTimer
Everytime this timer is fired the fps of the message source are checked and the streaming is started ...
QTimer m_StreamingTimer
the timer that is configured depending on the fps, if it is fired the pipeline is updated and the IGT...