Medical Imaging Interaction Toolkit  2018.4.99-f51274ea
Medical Imaging Interaction Toolkit
mitkNavigationDataSource.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 
14 #ifndef MITKNAVIGATIONDATASOURCE_H_HEADER_INCLUDED_
15 #define MITKNAVIGATIONDATASOURCE_H_HEADER_INCLUDED_
16 
17 #include <itkProcessObject.h>
18 #include "mitkNavigationData.h"
19 #include <mitkNavigationTool.h>
21 #include "mitkPropertyList.h"
22 #include "MitkIGTExports.h"
23 
24 // Microservices
25 #include <mitkServiceInterface.h>
26 #include <usServiceRegistration.h>
27 
28 namespace mitk {
29 
40  class MITKIGT_EXPORT NavigationDataSource : public itk::ProcessObject
41  {
42  public:
43  mitkClassMacroItkParent(NavigationDataSource, itk::ProcessObject);
44 
48  itkGetMacro(Name,std::string);
49 
53  itkSetMacro(Name,std::string);
54 
58  NavigationData* GetOutput(void);
59 
63  NavigationData* GetOutput(DataObjectPointerArraySizeType idx);
64 
68  NavigationData* GetOutput(const std::string& navDataName);
69 
74  NavigationTool::Pointer GetToolMetaData(DataObjectPointerArraySizeType idx);
75 
80  NavigationTool::Pointer GetToolMetaData(const std::string& navDataName);
81 
86  itkGetMacro(ToolMetaDataCollection, mitk::NavigationToolStorage::Pointer);
87 
89  itkSetMacro(ToolMetaDataCollection, mitk::NavigationToolStorage::Pointer);
90 
96  DataObjectPointerArraySizeType GetOutputIndex(std::string navDataName);
97 
102  virtual void RegisterAsMicroservice();
103 
107  virtual void UnRegisterMicroservice();
108 
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_ID;
121  static const std::string US_PROPKEY_ISACTIVE; //NOT IMPLEMENTED YET!
122 
128  virtual void GraftNthOutput(unsigned int idx, itk::DataObject *graft);
129 
135  virtual void GraftOutput(itk::DataObject *graft);
136 
143  itk::DataObject::Pointer MakeOutput ( DataObjectPointerArraySizeType idx ) override;
144 
151  itk::DataObject::Pointer MakeOutput(const DataObjectIdentifierType &name) override;
152 
161  virtual void SetParameters(const mitk::PropertyList*){};
162 
176  virtual mitk::PropertyList::ConstPointer GetParameters() const;
177 
181  virtual void Freeze();
182 
184  virtual void UnFreeze();
185 
187  itkGetMacro(IsFrozen,bool);
188 
189 
190  protected:
192  ~NavigationDataSource() override;
193 
194  std::string m_Name;
195 
197 
201  NavigationToolStorage::Pointer m_ToolMetaDataCollection;
202 
203 
204  private:
205  us::ServiceRegistration<Self> m_ServiceRegistration;
206  };
207 } // namespace mitk
208 // This is the microservice declaration. Do not meddle!
209 MITK_DECLARE_SERVICE_INTERFACE(mitk::NavigationDataSource, "org.mitk.services.NavigationDataSource")
210 #endif /* MITKNAVIGATIONDATASOURCE_H_HEADER_INCLUDED_ */
#define MITK_DECLARE_SERVICE_INTERFACE(IFace, IId)
Navigation Data.
DataCollection - Class to facilitate loading/accessing structured data.
NavigationToolStorage::Pointer m_ToolMetaDataCollection
Key-value list holding instances of BaseProperty.
static const std::string US_PROPKEY_ID
#define MITKIGT_EXPORT
static const std::string US_INTERFACE_NAME
These Constants are used in conjunction with Microservices.
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:49
static const std::string US_PROPKEY_ISACTIVE
virtual void SetParameters(const mitk::PropertyList *)
Set all filter parameters as the PropertyList p.
static const std::string US_PROPKEY_DEVICENAME