Medical Imaging Interaction Toolkit  2023.12.00
Medical Imaging Interaction Toolkit
mitk::ToolManagerProvider Class Reference

Micro Service Singleton to get an instance of mitk::ToolManager. More...

#include <mitkToolManagerProvider.h>

Inheritance diagram for mitk::ToolManagerProvider:
Collaboration diagram for mitk::ToolManagerProvider:

Public Types

using ProviderMapType = std::map< std::string, mitk::ToolManager::Pointer >
 

Public Member Functions

 mitkClassMacroItkParent (ToolManagerProvider, itk::LightObject)
 
virtual mitk::ToolManagerGetToolManager (const std::string &context=SEGMENTATION)
 Returns ToolManager object. More...
 
ProviderMapType GetToolManagers () const
 Returns all registered ToolManager objects. More...
 

Static Public Member Functions

static mitk::ToolManagerProviderGetInstance ()
 Returns an instance of ToolManagerProvider service. More...
 

Static Public Attributes

static const char *const SEGMENTATION
 

Protected Member Functions

Pointer Clone () const
 
 ToolManagerProvider ()
 
 ~ToolManagerProvider () override
 
 ToolManagerProvider (const ToolManagerProvider &)
 
ToolManagerProvideroperator= (const ToolManagerProvider &)
 

Static Protected Member Functions

static Pointer New ()
 

Protected Attributes

ProviderMapType m_ToolManagers
 

Detailed Description

Micro Service Singleton to get an instance of mitk::ToolManager.

See also
ToolManager

Implemented as a registry to have implicitly only one instance of ToolManager per context. Context is nothing more than a unique string, for example, use your plugin's id as context. Use this service to make sure your Tools are managed by the object.

Note
Can only be instantiated by SegmentationModuleActivator. The common way to get the ToolManager is by mitk::ToolManager* toolManager = mitk::ToolManagerProvider::GetInstance()->GetToolManager("my context");

Definition at line 44 of file mitkToolManagerProvider.h.

Member Typedef Documentation

◆ ProviderMapType

using mitk::ToolManagerProvider::ProviderMapType = std::map<std::string, mitk::ToolManager::Pointer>

Definition at line 49 of file mitkToolManagerProvider.h.

Constructor & Destructor Documentation

◆ ToolManagerProvider() [1/2]

mitk::ToolManagerProvider::ToolManagerProvider ( )
protected

◆ ~ToolManagerProvider()

mitk::ToolManagerProvider::~ToolManagerProvider ( )
overrideprotected

◆ ToolManagerProvider() [2/2]

mitk::ToolManagerProvider::ToolManagerProvider ( const ToolManagerProvider )
protected

Member Function Documentation

◆ Clone()

Pointer mitk::ToolManagerProvider::Clone ( ) const
protected

◆ GetInstance()

static mitk::ToolManagerProvider* mitk::ToolManagerProvider::GetInstance ( )
static

Returns an instance of ToolManagerProvider service.

◆ GetToolManager()

virtual mitk::ToolManager* mitk::ToolManagerProvider::GetToolManager ( const std::string &  context = SEGMENTATION)
virtual

Returns ToolManager object.

Parameters
contextA unique, non-empty string to retrieve a certain ToolManager instance. For backwards-compatibility, the overload without arguments is returning the classic segmentation ToolManager instance. If a ToolManager instance does not yet exist for a given context, it is created on the fly.

◆ GetToolManagers()

ProviderMapType mitk::ToolManagerProvider::GetToolManagers ( ) const

Returns all registered ToolManager objects.

◆ mitkClassMacroItkParent()

mitk::ToolManagerProvider::mitkClassMacroItkParent ( ToolManagerProvider  ,
itk::LightObject   
)

◆ New()

static Pointer mitk::ToolManagerProvider::New ( )
staticprotected

◆ operator=()

ToolManagerProvider& mitk::ToolManagerProvider::operator= ( const ToolManagerProvider )
protected

Member Data Documentation

◆ m_ToolManagers

ProviderMapType mitk::ToolManagerProvider::m_ToolManagers
protected

Definition at line 85 of file mitkToolManagerProvider.h.

◆ SEGMENTATION

const char* const mitk::ToolManagerProvider::SEGMENTATION
static

Definition at line 52 of file mitkToolManagerProvider.h.


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