Medical Imaging Interaction Toolkit
2018.4.99-389bf124
Medical Imaging Interaction Toolkit
|
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 AbstractAnnotationRenderer * | GetAnnotationRenderer (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::Annotation * | GetAnnotation (const std::string &AnnotationID) |
GetAnnotation returns a registered Annotation for a specified ID. More... | |
The AnnotationUtils class provides static functions for accsessing registered AnnotationRenderers and Annotations.
Definition at line 33 of file mitkAnnotationUtils.h.
typedef std::vector<std::unique_ptr<AbstractAnnotationRenderer> > mitk::AnnotationUtils::AnnotationRendererServices |
Definition at line 36 of file mitkAnnotationUtils.h.
mitk::AnnotationUtils::AnnotationUtils | ( | ) |
Definition at line 21 of file mitkAnnotationUtils.cpp.
mitk::AnnotationUtils::~AnnotationUtils | ( | ) |
Definition at line 22 of file mitkAnnotationUtils.cpp.
|
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.
renderer | The 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().
|
static |
GetAnnotation returns a registered Annotation for a specified ID.
AnnotationID |
Definition at line 93 of file mitkAnnotationUtils.cpp.
References us::GetModuleContext(), ModuleContext::GetService(), and mitk::Annotation::US_PROPKEY_ID.
Referenced by main().
|
static |
GetAnnotationRenderer returns a registered AnnotationRenderer of a specific type and for a BaseRenderer.
arTypeID | name specifier of the AnnotationRenderer |
rendererID | name specifier of the BaseRenderer |
Definition at line 23 of file mitkAnnotationUtils.cpp.
References us::GetModuleContext(), us::ServiceTracker< S, TTT >::GetService(), mitk::AbstractAnnotationRenderer::US_INTERFACE_NAME, mitk::AbstractAnnotationRenderer::US_PROPKEY_ID, and mitk::AbstractAnnotationRenderer::US_PROPKEY_RENDERER_ID.
Referenced by BaseRendererChanged(), mitk::ManualPlacementAnnotationRenderer::GetAnnotationRenderer(), mitk::LayoutAnnotationRenderer::GetAnnotationRenderer(), and UpdateAnnotationRenderer().
|
static |
GetAnnotationRenderer returns a list of registered AnnotationRenderers for a specified BaseRenderer.
rendererID | name specifier of the BaseRenderer |
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.
|
static |
RegisterAnnotationRenderer registers an AnnotationRenderer as a microservice and saves a reference to it in a local static list.
annotationRenderer |
Definition at line 47 of file mitkAnnotationUtils.cpp.
References mitk::AbstractAnnotationRenderer::GetID(), us::GetModuleContext(), mitk::AbstractAnnotationRenderer::GetRendererID(), ModuleContext::RegisterService(), mitk::AbstractAnnotationRenderer::US_PROPKEY_ID, and mitk::AbstractAnnotationRenderer::US_PROPKEY_RENDERER_ID.
Referenced by mitk::ManualPlacementAnnotationRenderer::GetAnnotationRenderer(), and mitk::LayoutAnnotationRenderer::GetAnnotationRenderer().
|
static |
UpdateAnnotationRenderer is a convenience function which calls AbstractAnnotationRenderer::Update for each registered AnnotationRenderer of a specific BaseRenderer.
rendererID |
Definition at line 59 of file mitkAnnotationUtils.cpp.
References GetAnnotationRenderer().