Medical Imaging Interaction Toolkit
2024.12.99-0da743f6
Medical Imaging Interaction Toolkit
|
Micro Service Singleton to get an instance of mitk::ToolManager. More...
#include <mitkToolManagerProvider.h>
Public Types | |
using | ProviderMapType = std::map< std::string, mitk::ToolManager::Pointer > |
Public Member Functions | |
mitkClassMacroItkParent (ToolManagerProvider, itk::LightObject) | |
virtual mitk::ToolManager * | GetToolManager (const std::string &context=SEGMENTATION) |
Returns ToolManager object. More... | |
ProviderMapType | GetToolManagers () const |
Returns all registered ToolManager objects. More... | |
Static Public Member Functions | |
static mitk::ToolManagerProvider * | GetInstance () |
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 &) | |
ToolManagerProvider & | operator= (const ToolManagerProvider &) |
Static Protected Member Functions | |
static Pointer | New () |
Protected Attributes | |
ProviderMapType | m_ToolManagers |
Micro Service Singleton to get an instance of mitk::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.
mitk::ToolManager* toolManager = mitk::ToolManagerProvider::GetInstance()->GetToolManager("my context");
Definition at line 44 of file mitkToolManagerProvider.h.
using mitk::ToolManagerProvider::ProviderMapType = std::map<std::string, mitk::ToolManager::Pointer> |
Definition at line 49 of file mitkToolManagerProvider.h.
|
protected |
|
overrideprotected |
|
protected |
|
protected |
|
static |
Returns an instance of ToolManagerProvider service.
|
virtual |
Returns ToolManager object.
context | A 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. |
ProviderMapType mitk::ToolManagerProvider::GetToolManagers | ( | ) | const |
Returns all registered ToolManager objects.
mitk::ToolManagerProvider::mitkClassMacroItkParent | ( | ToolManagerProvider | , |
itk::LightObject | |||
) |
|
staticprotected |
|
protected |
|
protected |
Definition at line 85 of file mitkToolManagerProvider.h.
|
static |
Definition at line 52 of file mitkToolManagerProvider.h.