Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitkAnnotationUtils.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 mitkAnnotationUtils_h
14 #define mitkAnnotationUtils_h
15 
16 #include <MitkCoreExports.h>
17 #include <memory>
18 #include <string>
19 #include <vector>
20 
21 class vtkObject;
22 
23 namespace mitk
24 {
25  class AbstractAnnotationRenderer;
26  class Annotation;
27  class BaseRenderer;
28 
34  {
35  public:
37  typedef std::vector<std::unique_ptr<AbstractAnnotationRenderer>> AnnotationRendererServices;
38 
41 
44 
52  static AbstractAnnotationRenderer *GetAnnotationRenderer(const std::string &arTypeID,
53  const std::string &rendererID);
54 
62  static void RegisterAnnotationRenderer(AbstractAnnotationRenderer *annotationRenderer);
63 
70  static std::vector<AbstractAnnotationRenderer *> GetAnnotationRenderer(const std::string &rendererID);
71 
78  static void UpdateAnnotationRenderer(const std::string &rendererID);
79 
88  static void BaseRendererChanged(BaseRenderer *renderer);
89 
96  static mitk::Annotation *GetAnnotation(const std::string &AnnotationID);
97 
98  private:
100  AnnotationUtils &operator=(const AnnotationUtils &);
101 
103  static void RenderWindowCallback(vtkObject *caller, unsigned long, void *, void *);
104  };
105 }
106 
107 #endif
#define MITKCORE_EXPORT
Base class for Annotation layout managers.
Provides static utility functions for accessing registered AnnotationRenderers and Annotations.
static void BaseRendererChanged(BaseRenderer *renderer)
Notify that the actual BaseRenderer object for a BaseRenderer ID has changed.
static mitk::Annotation * GetAnnotation(const std::string &AnnotationID)
Get a registered Annotation by its unique ID.
static void UpdateAnnotationRenderer(const std::string &rendererID)
Call AbstractAnnotationRenderer::Update for each registered AnnotationRenderer of the specified BaseR...
std::vector< std::unique_ptr< AbstractAnnotationRenderer > > AnnotationRendererServices
Container type for managed AnnotationRenderer instances.
static std::vector< AbstractAnnotationRenderer * > GetAnnotationRenderer(const std::string &rendererID)
Get all registered AnnotationRenderers for a specified BaseRenderer.
AnnotationUtils()
Constructor.
~AnnotationUtils()
Destructor.
static AbstractAnnotationRenderer * GetAnnotationRenderer(const std::string &arTypeID, const std::string &rendererID)
Get a registered AnnotationRenderer of a specific type for a given BaseRenderer.
static void RegisterAnnotationRenderer(AbstractAnnotationRenderer *annotationRenderer)
Register an AnnotationRenderer as a microservice.
Base class for all Annotation objects.
Organizes the rendering process.
Find image slices visible on a given plane.