MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
mitkIGTLDeviceSource.h
Go to the documentation of this file.
1/*============================================================================
2
3The Medical Imaging Interaction Toolkit (MITK)
4
5Copyright (c) German Cancer Research Center (DKFZ)
6All rights reserved.
7
8Use of this source code is governed by a 3-clause BSD license that can be
9found in the LICENSE file.
10
11============================================================================*/
12
13#ifndef mitkIGTLDeviceSource_h
14#define mitkIGTLDeviceSource_h
15
16#include "mitkIGTLDevice.h"
18
19namespace mitk {
30 class MITKOPENIGTLINK_EXPORT IGTLDeviceSource : public IGTLMessageSource
31 {
32 public:
36
40 static const std::string US_PROPKEY_IGTLDEVICENAME;
41
45 virtual void SetIGTLDevice(mitk::IGTLDevice* td);
46
51
56 void RegisterAsMicroservice() override;
57
65 void Connect();
66
73 void Disconnect();
74
83 void StartCommunication();
84
91 void StopCommunication();
92
97 virtual bool IsConnected();
98
103 virtual bool IsCommunicating();
104
108 void UpdateOutputInformation() override;
109
110 protected:
112 ~IGTLDeviceSource() override;
113
122 void GenerateData() override;
123
130 void CreateOutputs();
131
136 virtual void OnIncomingMessage();
137
142 virtual void OnIncomingCommand();
143
147 virtual void OnLostConnection();
148
152 virtual void RemoveObservers();
153
154
155 using Superclass::SetInput;
156
161 virtual void SetInput( unsigned int idx, const IGTLMessage* msg );
162
166 const IGTLMessage* GetInput(void) const;
167
171 const IGTLMessage* GetInput(unsigned int idx) const;
172
176 const IGTLMessage* GetInput(std::string msgName) const;
177
185 DataObjectPointerArraySizeType GetInputIndex(std::string msgName);
186
194 DataObjectPointerArraySizeType GetOutputIndex(std::string msgName);
195
197 mitk::IGTLDevice::Pointer m_IGTLDevice;
198
203 };
204} // namespace mitk
205#endif
Connects a mitk::IGTLDevice to a MITK-OpenIGTLink-Message-Filter-Pipeline.
DataObjectPointerArraySizeType GetOutputIndex(std::string msgName)
return the index of the output with name msgName, -1 if no output with that name was found
itkGetObjectMacro(IGTLDevice, mitk::IGTLDevice)
returns the OpenIGTLink device that is used by this filter
unsigned int m_IncomingMessageObserverTag
mitkClassMacro(IGTLDeviceSource, IGTLMessageSource)
static const std::string US_PROPKEY_IGTLDEVICENAME
These Constants are used in conjunction with Microservices.
unsigned int m_IncomingCommandObserverTag
mitk::IGTLDevice::Pointer m_IGTLDevice
Interface for all OpenIGTLink Devices.
OpenIGTLink message source.
A wrapper for the OpenIGTLink message type.
IGT Exceptions.