Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitk::AbstractAnnotationRenderer Class Reference

Base class for Annotation layout managers. More...

#include <mitkAbstractAnnotationRenderer.h>

Inheritance diagram for mitk::AbstractAnnotationRenderer:
Collaboration diagram for mitk::AbstractAnnotationRenderer:

Public Types

typedef us::ServiceTracker< Annotation > Superclass
 
- Public Types inherited from us::ServiceTracker< Annotation >
typedef Annotation ServiceType
 The type of the service being tracked. More...
 
typedef TTT::TrackedType T
 The type of the tracked object. More...
 
typedef ServiceReference< Annotation > ServiceReferenceType
 The service reference type. More...
 
typedef std::map< ServiceReference< Annotation >, T > TrackingMap
 A map type from ServiceReference to tracked objects. More...
 

Public Member Functions

 AbstractAnnotationRenderer (const std::string &rendererID, const std::string &arID)
 Construct an annotation renderer for a specific renderer and annotation renderer ID. More...
 
 ~AbstractAnnotationRenderer () override
 Virtual destructor. More...
 
const std::string GetID () const
 Get the unique ID of this annotation renderer. More...
 
const std::string GetRendererID () const
 Get the ID of the associated BaseRenderer. More...
 
void CurrentBaseRendererChanged ()
 Notify that the current BaseRenderer has changed. More...
 
virtual void OnRenderWindowModified ()
 Called when the render window is modified. Override to react to changes. More...
 
void RemoveAllAnnotation ()
 Remove all tracked Annotation objects from the associated renderer. More...
 
void Update ()
 Update all tracked Annotation objects. More...
 
- Public Member Functions inherited from us::ServiceTracker< Annotation >
 ~ServiceTracker () override
 Destructor. More...
 
 ServiceTracker (ModuleContext *context, const ServiceReferenceType &reference, ServiceTrackerCustomizer< Annotation, T > *customizer=nullptr)
 Create a ServiceTracker on the specified ServiceReference. More...
 
 ServiceTracker (ModuleContext *context, const std::string &clazz, ServiceTrackerCustomizer< Annotation, T > *customizer=0)
 Create a ServiceTracker on the specified class name. More...
 
 ServiceTracker (ModuleContext *context, const LDAPFilter &filter, ServiceTrackerCustomizer< Annotation, T > *customizer=nullptr)
 Create a ServiceTracker on the specified LDAPFilter object. More...
 
 ServiceTracker (ModuleContext *context, ServiceTrackerCustomizer< Annotation, T > *customizer=nullptr)
 Create a ServiceTracker on the class template argument S. More...
 
virtual void Open ()
 Open this ServiceTracker and begin tracking services. More...
 
virtual void Close ()
 Close this ServiceTracker. More...
 
virtual T WaitForService (unsigned long timeoutMillis=0)
 Wait for at least one service to be tracked by this ServiceTracker. This method will also return when this ServiceTracker is closed. More...
 
virtual std::vector< ServiceReferenceType > GetServiceReferences () const
 Return a list of ServiceReferences for all services being tracked by this ServiceTracker. More...
 
virtual ServiceReferenceType GetServiceReference () const
 Returns a ServiceReference for one of the services being tracked by this ServiceTracker. More...
 
virtual T GetService (const ServiceReferenceType &reference) const
 Returns the service object for the specified ServiceReference if the specified referenced service is being tracked by this ServiceTracker. More...
 
virtual T GetService () const
 Returns a service object for one of the services being tracked by this ServiceTracker. More...
 
virtual std::vector< T > GetServices () const
 Return a list of service objects for all services being tracked by this ServiceTracker. More...
 
virtual void Remove (const ServiceReferenceType &reference)
 Remove a service from this ServiceTracker. More...
 
virtual int Size () const
 Return the number of services being tracked by this ServiceTracker. More...
 
virtual int GetTrackingCount () const
 Returns the tracking count for this ServiceTracker. More...
 
virtual void GetTracked (TrackingMap &tracked) const
 Return a sorted map of the ServiceReferences and service objects for all services being tracked by this ServiceTracker. The map is sorted in natural order of ServiceReference. That is, the last entry is the service with the highest ranking and the lowest service id. More...
 
virtual bool IsEmpty () const
 Return if this ServiceTracker is empty. More...
 

Static Public Attributes

static const std::string US_INTERFACE_NAME
 Micro service interface name. More...
 
static const std::string US_PROPKEY_ID
 Service property key for the annotation renderer ID. More...
 
static const std::string US_PROPKEY_RENDERER_ID
 Service property key for the renderer ID. More...
 

Protected Member Functions

BaseRenderer * GetCurrentBaseRenderer ()
 Get the BaseRenderer associated with this annotation renderer. More...
 
- Protected Member Functions inherited from us::ServiceTracker< Annotation >
T AddingService (const ServiceReferenceType &reference) override
 Default implementation of the ServiceTrackerCustomizer::AddingService method. More...
 
void ModifiedService (const ServiceReferenceType &reference, T service) override
 Default implementation of the ServiceTrackerCustomizer::ModifiedService method. More...
 
void RemovedService (const ServiceReferenceType &reference, T service) override
 Default implementation of the ServiceTrackerCustomizer::RemovedService method. More...
 
- Protected Member Functions inherited from us::ServiceTrackerCustomizer< S, T >
virtual ~ServiceTrackerCustomizer ()
 Destructor. More...
 
virtual void ModifiedService (const ServiceReferenceType &reference, TrackedType service)=0
 A service tracked by the ServiceTracker has been modified. More...
 
virtual void RemovedService (const ServiceReferenceType &reference, TrackedType service)=0
 A service tracked by the ServiceTracker has been removed. More...
 

Additional Inherited Members

- Protected Types inherited from us::ServiceTrackerCustomizer< S, T >
typedef S ServiceType
 The service type being tracked. More...
 
typedef T TrackedType
 The tracked object type. More...
 
typedef ServiceReference< ServiceType > ServiceReferenceType
 The service reference type for the tracked service. More...
 

Detailed Description

Base class for Annotation layout managers.

An AbstractAnnotationRenderer can be implemented to control a set of Annotation objects by means of position and size within a specific BaseRenderer. It tracks Annotation micro services and manages their lifecycle.

See also
Annotation
BaseRenderer

Definition at line 37 of file mitkAbstractAnnotationRenderer.h.

Member Typedef Documentation

◆ Superclass

Constructor & Destructor Documentation

◆ AbstractAnnotationRenderer()

mitk::AbstractAnnotationRenderer::AbstractAnnotationRenderer ( const std::string &  rendererID,
const std::string &  arID 
)

Construct an annotation renderer for a specific renderer and annotation renderer ID.

Parameters
[in]rendererIDThe ID of the BaseRenderer this annotation renderer is associated with.
[in]arIDThe unique ID for this annotation renderer.

◆ ~AbstractAnnotationRenderer()

mitk::AbstractAnnotationRenderer::~AbstractAnnotationRenderer ( )
override

Virtual destructor.

Member Function Documentation

◆ CurrentBaseRendererChanged()

void mitk::AbstractAnnotationRenderer::CurrentBaseRendererChanged ( )

Notify that the current BaseRenderer has changed.

◆ GetCurrentBaseRenderer()

BaseRenderer* mitk::AbstractAnnotationRenderer::GetCurrentBaseRenderer ( )
protected

Get the BaseRenderer associated with this annotation renderer.

Returns
Pointer to the current BaseRenderer.

◆ GetID()

const std::string mitk::AbstractAnnotationRenderer::GetID ( ) const

Get the unique ID of this annotation renderer.

Returns
The annotation renderer ID.

◆ GetRendererID()

const std::string mitk::AbstractAnnotationRenderer::GetRendererID ( ) const

Get the ID of the associated BaseRenderer.

Returns
The renderer ID string.

◆ OnRenderWindowModified()

virtual void mitk::AbstractAnnotationRenderer::OnRenderWindowModified ( )
inlinevirtual

Called when the render window is modified. Override to react to changes.

Reimplemented in mitk::LayoutAnnotationRenderer.

Definition at line 69 of file mitkAbstractAnnotationRenderer.h.

◆ RemoveAllAnnotation()

void mitk::AbstractAnnotationRenderer::RemoveAllAnnotation ( )

Remove all tracked Annotation objects from the associated renderer.

◆ Update()

void mitk::AbstractAnnotationRenderer::Update ( )

Update all tracked Annotation objects.

Member Data Documentation

◆ US_INTERFACE_NAME

const std::string mitk::AbstractAnnotationRenderer::US_INTERFACE_NAME
static

Micro service interface name.

Definition at line 77 of file mitkAbstractAnnotationRenderer.h.

◆ US_PROPKEY_ID

const std::string mitk::AbstractAnnotationRenderer::US_PROPKEY_ID
static

Service property key for the annotation renderer ID.

Definition at line 78 of file mitkAbstractAnnotationRenderer.h.

◆ US_PROPKEY_RENDERER_ID

const std::string mitk::AbstractAnnotationRenderer::US_PROPKEY_RENDERER_ID
static

Service property key for the renderer ID.

Definition at line 79 of file mitkAbstractAnnotationRenderer.h.


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