Medical Imaging Interaction Toolkit  2018.4.99-6aa36ba9
Medical Imaging Interaction Toolkit
mitk::AnnotationUtils Class Reference

The AnnotationUtils class provides static functions for accsessing registered AnnotationRenderers and Annotations. More...

#include <mitkAnnotationUtils.h>

Public Types

typedef std::vector< std::unique_ptr< AbstractAnnotationRenderer > > AnnotationRendererServices
 

Public Member Functions

 AnnotationUtils ()
 
 ~AnnotationUtils ()
 

Static Public Member Functions

static AbstractAnnotationRendererGetAnnotationRenderer (const std::string &arTypeID, const std::string &rendererID)
 GetAnnotationRenderer returns a registered AnnotationRenderer of a specific type and for a BaseRenderer. More...
 
static void RegisterAnnotationRenderer (AbstractAnnotationRenderer *annotationRenderer)
 RegisterAnnotationRenderer registers an AnnotationRenderer as a microservice and saves a reference to it in a local static list. More...
 
static std::vector< AbstractAnnotationRenderer * > GetAnnotationRenderer (const std::string &rendererID)
 GetAnnotationRenderer returns a list of registered AnnotationRenderers for a specified BaseRenderer. More...
 
static void UpdateAnnotationRenderer (const std::string &rendererID)
 UpdateAnnotationRenderer is a convenience function which calls AbstractAnnotationRenderer::Update for each registered AnnotationRenderer of a specific BaseRenderer. More...
 
static void BaseRendererChanged (BaseRenderer *renderer)
 BaseRendererChanged has to be called in the case that the actual BaseRenderer object for a BaseRenderer ID has changed. E.g. if a RenderWindow was closed and reopened. More...
 
static mitk::AnnotationGetAnnotation (const std::string &AnnotationID)
 GetAnnotation returns a registered Annotation for a specified ID. More...
 

Detailed Description

The AnnotationUtils class provides static functions for accsessing registered AnnotationRenderers and Annotations.

Definition at line 33 of file mitkAnnotationUtils.h.

Member Typedef Documentation

◆ AnnotationRendererServices

Definition at line 36 of file mitkAnnotationUtils.h.

Constructor & Destructor Documentation

◆ AnnotationUtils()

mitk::AnnotationUtils::AnnotationUtils ( )

Definition at line 21 of file mitkAnnotationUtils.cpp.

◆ ~AnnotationUtils()

mitk::AnnotationUtils::~AnnotationUtils ( )

Definition at line 22 of file mitkAnnotationUtils.cpp.

Member Function Documentation

◆ BaseRendererChanged()

void mitk::AnnotationUtils::BaseRendererChanged ( BaseRenderer renderer)
static

BaseRendererChanged has to be called in the case that the actual BaseRenderer object for a BaseRenderer ID has changed. E.g. if a RenderWindow was closed and reopened.

Parameters
rendererThe new BaseRenderer

Definition at line 67 of file mitkAnnotationUtils.cpp.

References GetAnnotationRenderer(), mitk::BaseRenderer::GetInstance(), mitk::BaseRenderer::GetName(), and mitk::BaseRenderer::GetRenderWindow().

Referenced by mitk::RenderWindowBase::Initialize().

◆ GetAnnotation()

Annotation * mitk::AnnotationUtils::GetAnnotation ( const std::string &  AnnotationID)
static

GetAnnotation returns a registered Annotation for a specified ID.

Parameters
AnnotationID
Returns

Definition at line 93 of file mitkAnnotationUtils.cpp.

References us::GetModuleContext(), ModuleContext::GetService(), and mitk::Annotation::US_PROPKEY_ID.

Referenced by main().

◆ GetAnnotationRenderer() [1/2]

AbstractAnnotationRenderer * mitk::AnnotationUtils::GetAnnotationRenderer ( const std::string &  arTypeID,
const std::string &  rendererID 
)
static

◆ GetAnnotationRenderer() [2/2]

std::vector< AbstractAnnotationRenderer * > mitk::AnnotationUtils::GetAnnotationRenderer ( const std::string &  rendererID)
static

GetAnnotationRenderer returns a list of registered AnnotationRenderers for a specified BaseRenderer.

Parameters
rendererIDname specifier of the BaseRenderer
Returns

Definition at line 107 of file mitkAnnotationUtils.cpp.

References us::GetModuleContext(), mitk::AbstractAnnotationRenderer::US_INTERFACE_NAME, mitk::AbstractAnnotationRenderer::US_PROPKEY_ID, and mitk::AbstractAnnotationRenderer::US_PROPKEY_RENDERER_ID.

◆ RegisterAnnotationRenderer()

void mitk::AnnotationUtils::RegisterAnnotationRenderer ( AbstractAnnotationRenderer annotationRenderer)
static

◆ UpdateAnnotationRenderer()

void mitk::AnnotationUtils::UpdateAnnotationRenderer ( const std::string &  rendererID)
static

UpdateAnnotationRenderer is a convenience function which calls AbstractAnnotationRenderer::Update for each registered AnnotationRenderer of a specific BaseRenderer.

Parameters
rendererID

Definition at line 59 of file mitkAnnotationUtils.cpp.

References GetAnnotationRenderer().


The documentation for this class was generated from the following files: