Medical Imaging Interaction Toolkit  2024.06.00
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 
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
mitkServiceInterface.h
us::ServiceTracker
Definition: usServiceTracker.h:231
mitkAnnotation.h
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
us::ServiceReference
Definition: usModule.h:40
mitk::AbstractAnnotationRenderer::Superclass
us::ServiceTracker< Annotation > Superclass
Definition: mitkAbstractAnnotationRenderer.h:34
us::ServiceTrackerCustomizer::TrackedType
T TrackedType
Definition: usServiceTrackerCustomizer.h:66
MitkCoreExports.h
mitk::AbstractAnnotationRenderer::OnRenderWindowModified
virtual void OnRenderWindowModified()
Definition: mitkAbstractAnnotationRenderer.h:45
mitk::AbstractAnnotationRenderer::US_INTERFACE_NAME
static const std::string US_INTERFACE_NAME
Definition: mitkAbstractAnnotationRenderer.h:49
mitk::AbstractAnnotationRenderer::US_PROPKEY_RENDERER_ID
static const std::string US_PROPKEY_RENDERER_ID
Definition: mitkAbstractAnnotationRenderer.h:51
mitkCommon.h
usServiceTracker.h
mitk::AbstractAnnotationRenderer::US_PROPKEY_ID
static const std::string US_PROPKEY_ID
Definition: mitkAbstractAnnotationRenderer.h:50
mitk::AbstractAnnotationRenderer
Baseclass of Annotation layouters An AbstractAnnotationRenderer can be implemented to control a set o...
Definition: mitkAbstractAnnotationRenderer.h:31
usGetModuleContext.h
mitk::BaseRenderer
Definition: mitkBaseRenderer.h:56
MITK_DECLARE_SERVICE_INTERFACE
#define MITK_DECLARE_SERVICE_INTERFACE(IFace, IId)
Definition: mitkServiceInterface.h:26
MITKCORE_EXPORT
#define MITKCORE_EXPORT
Definition: MitkCoreExports.h:15