Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
mitkAbstractAnnotationRenderer.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 ABSTRACTANNOTATIONRENDERER_H
14 #define ABSTRACTANNOTATIONRENDERER_H
15 
16 #include "mitkAnnotation.h"
17 #include "mitkServiceInterface.h"
18 #include "usGetModuleContext.h"
19 #include "usServiceTracker.h"
20 #include <MitkCoreExports.h>
21 #include <mitkCommon.h>
22 
23 namespace mitk
24 {
25  class BaseRenderer;
26 
32  {
33  public:
35  AbstractAnnotationRenderer(const std::string &rendererID, const std::string &arID);
36 
38  ~AbstractAnnotationRenderer() override;
39 
40  const std::string GetID() const;
41  const std::string GetRendererID() const;
42 
43  void CurrentBaseRendererChanged();
44 
45  virtual void OnRenderWindowModified() {}
46  void RemoveAllAnnotation();
47 
48  void Update();
49  static const std::string US_INTERFACE_NAME;
50  static const std::string US_PROPKEY_ID;
51  static const std::string US_PROPKEY_RENDERER_ID;
52 
53  protected:
54  BaseRenderer *GetCurrentBaseRenderer();
55 
56  private:
59 
62 
63  TrackedType AddingService(const ServiceReferenceType &reference) override;
64 
65  void ModifiedService(const ServiceReferenceType & /*reference*/, TrackedType tracked) override;
66 
67  void RemovedService(const ServiceReferenceType & /*reference*/, TrackedType tracked) override;
68 
69  virtual void OnAnnotationRenderersChanged() {}
70  const std::string m_RendererID;
71  const std::string m_ID;
72  };
73 
74 } // namespace mitk
75 
76 MITK_DECLARE_SERVICE_INTERFACE(mitk::AbstractAnnotationRenderer, "org.mitk.services.AbstractAnnotationRenderer")
77 
78 #endif // ABSTRACTANNOTATIONRENDERER_H
#define MITK_DECLARE_SERVICE_INTERFACE(IFace, IId)
#define MITKCORE_EXPORT
Organizes the rendering process.
static void Update(vtkPolyData *)
Definition: mitkSurface.cpp:31
DataCollection - Class to facilitate loading/accessing structured data.
Baseclass of Annotation layouters An AbstractAnnotationRenderer can be implemented to control a set o...
us::ServiceTracker< Annotation > Superclass