MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
mitkIGTLMessageSource.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
14#ifndef mitkIGTLMessageSource_h
15#define mitkIGTLMessageSource_h
16
17#include <itkProcessObject.h>
18#include "mitkPropertyList.h"
19#include "MitkOpenIGTLinkExports.h"
20#include "mitkIGTLMessage.h"
21
22// Microservices
23#include <mitkServiceInterface.h>
24#include <usServiceRegistration.h>
25
26#include <mutex>
27
28namespace mitk {
29
41 class MITKOPENIGTLINK_EXPORT IGTLMessageSource : public itk::ProcessObject
42 {
43 public:
45
50 itkGetMacro(Name,std::string);
51
56 itkSetMacro(Name,std::string);
57
63 itkGetMacro(Type,std::string);
64
70 itkSetMacro(Type,std::string);
71
75 IGTLMessage* GetOutput(void);
76
80 IGTLMessage* GetOutput(DataObjectPointerArraySizeType idx);
81
85 IGTLMessage* GetOutput(const std::string& messageName);
86
94 DataObjectPointerArraySizeType GetOutputIndex(std::string messageName);
95
100 virtual void RegisterAsMicroservice();
101
106 virtual void UnRegisterMicroservice();
107
113 std::string GetMicroserviceID();
114
118 static const std::string US_INTERFACE_NAME;
119 static const std::string US_PROPKEY_DEVICENAME;
120 static const std::string US_PROPKEY_DEVICETYPE;
121 static const std::string US_PROPKEY_ID;
122 static const std::string US_PROPKEY_ISACTIVE; //NOT IMPLEMENTED YET!
123
129 virtual void GraftNthOutput(unsigned int idx, itk::DataObject *graft);
130
136 virtual void GraftOutput(itk::DataObject *graft);
137
144 itk::DataObject::Pointer MakeOutput ( DataObjectPointerArraySizeType idx ) override;
145
152 itk::DataObject::Pointer MakeOutput(const DataObjectIdentifierType &name) override;
153
162 virtual void SetParameters(const mitk::PropertyList*){};
163
177 virtual mitk::PropertyList::ConstPointer GetParameters() const;
178
182 void SetFPS(unsigned int fps);
183
187 unsigned int GetFPS();
188
189 protected:
191 ~IGTLMessageSource() override;
192
193 std::string m_Name;
194 std::string m_Type;
195
196
200 unsigned int m_StreamingFPS;
201
202 us::ServiceRegistration<Self> m_ServiceRegistration;
203 };
204} // namespace mitk
205// This is the microservice declaration. Do not meddle!
206MITK_DECLARE_SERVICE_INTERFACE(mitk::IGTLMessageSource, "org.mitk.services.IGTLMessageSource")
207#endif
OpenIGTLink message source.
itkGetMacro(Name, std::string)
mitkClassMacroItkParent(IGTLMessageSource, itk::ProcessObject)
static const std::string US_INTERFACE_NAME
These Constants are used in conjunction with Microservices.
static const std::string US_PROPKEY_DEVICENAME
us::ServiceRegistration< Self > m_ServiceRegistration
static const std::string US_PROPKEY_ID
virtual void SetParameters(const mitk::PropertyList *)
Set all filter parameters as the PropertyList p.
itkGetMacro(Type, std::string)
static const std::string US_PROPKEY_ISACTIVE
itkSetMacro(Name, std::string)
Sets the human readable name of this source. There is also a default name, but you can use this metho...
itkSetMacro(Type, std::string)
Sets the human readable type of this source. There will be a default type, or you can set the name wi...
static const std::string US_PROPKEY_DEVICETYPE
A wrapper for the OpenIGTLink message type.
IGT Exceptions.