Medical Imaging Interaction Toolkit  2025.12.02
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 mitkAbstractAnnotationRenderer_h
14 #define mitkAbstractAnnotationRenderer_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 
39 
40  const std::string GetID() const;
41  const std::string GetRendererID() const;
42 
44 
45  virtual void OnRenderWindowModified() {}
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:
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
#define MITKCORE_EXPORT
Baseclass of Annotation layouters An AbstractAnnotationRenderer can be implemented to control a set o...
const std::string GetID() const
~AbstractAnnotationRenderer() override
virtual destructor in order to derive from this class
BaseRenderer * GetCurrentBaseRenderer()
us::ServiceTracker< Annotation > Superclass
AbstractAnnotationRenderer(const std::string &rendererID, const std::string &arID)
const std::string GetRendererID() const
#define MITK_DECLARE_SERVICE_INTERFACE(IFace, IId)
Find image slices visible on a given plane.