Medical Imaging Interaction Toolkit  2025.12.02
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:
36  typedef std::vector<std::unique_ptr<AbstractAnnotationRenderer>> AnnotationRendererServices;
39 
46  static AbstractAnnotationRenderer *GetAnnotationRenderer(const std::string &arTypeID,
47  const std::string &rendererID);
48 
54  static void RegisterAnnotationRenderer(AbstractAnnotationRenderer *annotationRenderer);
55 
61  static std::vector<AbstractAnnotationRenderer *> GetAnnotationRenderer(const std::string &rendererID);
62 
68  static void UpdateAnnotationRenderer(const std::string &rendererID);
69 
75  static void BaseRendererChanged(BaseRenderer *renderer);
76 
82  static mitk::Annotation *GetAnnotation(const std::string &AnnotationID);
83 
84  private:
86  AnnotationUtils &operator=(const AnnotationUtils &);
87 
88  static void RenderWindowCallback(vtkObject *caller, unsigned long, void *, void *);
89  };
90 }
91 
92 #endif
#define MITKCORE_EXPORT
Baseclass of Annotation layouters An AbstractAnnotationRenderer can be implemented to control a set o...
The AnnotationUtils class provides static functions for accsessing registered AnnotationRenderers and...
static void BaseRendererChanged(BaseRenderer *renderer)
BaseRendererChanged has to be called in the case that the actual BaseRenderer object for a BaseRender...
static mitk::Annotation * GetAnnotation(const std::string &AnnotationID)
GetAnnotation returns a registered Annotation for a specified ID.
static void UpdateAnnotationRenderer(const std::string &rendererID)
UpdateAnnotationRenderer is a convenience function which calls AbstractAnnotationRenderer::Update for...
std::vector< std::unique_ptr< AbstractAnnotationRenderer > > AnnotationRendererServices
static std::vector< AbstractAnnotationRenderer * > GetAnnotationRenderer(const std::string &rendererID)
GetAnnotationRenderer returns a list of registered AnnotationRenderers for a specified BaseRenderer.
static AbstractAnnotationRenderer * GetAnnotationRenderer(const std::string &arTypeID, const std::string &rendererID)
GetAnnotationRenderer returns a registered AnnotationRenderer of a specific type and for a BaseRender...
static void RegisterAnnotationRenderer(AbstractAnnotationRenderer *annotationRenderer)
RegisterAnnotationRenderer registers an AnnotationRenderer as a microservice and saves a reference to...
Base class for all Annotation This class is to be implemented in order to create Annotation which are...
Find image slices visible on a given plane.