Medical Imaging Interaction Toolkit  2021.10.99-1c4db16f
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
static const char *const MULTILABEL_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

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.

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 ( )

◆ ~ToolManagerProvider()

mitk::ToolManagerProvider::~ToolManagerProvider ( )

◆ ToolManagerProvider() [2/2]

mitk::ToolManagerProvider::ToolManagerProvider ( const ToolManagerProvider )

Member Function Documentation

◆ Clone()

Pointer mitk::ToolManagerProvider::Clone ( ) const

◆ GetInstance()

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

Returns an instance of ToolManagerProvider service.

◆ GetToolManager()

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

Returns ToolManager object.

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  ,

◆ New()

static Pointer mitk::ToolManagerProvider::New ( )

◆ operator=()

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

Member Data Documentation

◆ m_ToolManagers

ProviderMapType mitk::ToolManagerProvider::m_ToolManagers

Definition at line 86 of file mitkToolManagerProvider.h.


const char* const mitk::ToolManagerProvider::MULTILABEL_SEGMENTATION

Definition at line 53 of file mitkToolManagerProvider.h.


const char* const mitk::ToolManagerProvider::SEGMENTATION

Definition at line 52 of file mitkToolManagerProvider.h.

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