Medical Imaging Interaction Toolkit  2024.12.99-0da743f6
Medical Imaging Interaction Toolkit
mitk::CoreServices Class Reference

Access MITK core services. More...

#include <mitkCoreServices.h>

Static Public Member Functions

static INodeSelectionServiceGetNodeSelectionService (us::ModuleContext *context=us::GetModuleContext())
 Get an INodeSelectionsService instance. More...
 
static IPropertyAliasesGetPropertyAliases (us::ModuleContext *context=us::GetModuleContext())
 Get an IPropertyAliases instance. More...
 
static IPropertyDescriptionsGetPropertyDescriptions (us::ModuleContext *context=us::GetModuleContext())
 Get an IPropertyDescriptions instance. More...
 
static IPropertyDeserializationGetPropertyDeserialization (us::ModuleContext *context=us::GetModuleContext())
 Get an IPropertyDeserialization instance. More...
 
static IPropertyExtensionsGetPropertyExtensions (us::ModuleContext *context=us::GetModuleContext())
 Get an IPropertyExtensions instance. More...
 
static IPropertyFiltersGetPropertyFilters (us::ModuleContext *context=us::GetModuleContext())
 Get an IPropertyFilters instance. More...
 
static IPropertyPersistenceGetPropertyPersistence (us::ModuleContext *context=us::GetModuleContext())
 Get an IPropertyPersistence instance. More...
 
static IPropertyRelationsGetPropertyRelations (us::ModuleContext *context=us::GetModuleContext())
 Get an IPropertyRelations instance. More...
 
static IMimeTypeProviderGetMimeTypeProvider (us::ModuleContext *context=us::GetModuleContext())
 Get an IMimeTypeProvider instance. More...
 
static IPreferencesServiceGetPreferencesService (us::ModuleContext *context=us::GetModuleContext())
 Get an IPreferencesService instance. More...
 
template<class S >
static bool Unget (S *service, us::ModuleContext *context=us::GetModuleContext())
 Unget a previously acquired service instance. More...
 

Detailed Description

Access MITK core services.

This class can be used to conveniently access common MITK Core service objects. Some getter methods where implementations exist in the core library are guaranteed to return a non-nullptr service object.

To ensure that CoreServices::Unget() is called after the caller has finished using a service object, you should use the CoreServicePointer helper class which calls Unget() when it goes out of scope:

CoreServicePointer<IShaderRepository> shaderRepo(CoreServices::GetShaderRepository());
// Do something with shaderRepo
See also
CoreServicePointer

Definition at line 59 of file mitkCoreServices.h.

Member Function Documentation

◆ GetMimeTypeProvider()

static IMimeTypeProvider* mitk::CoreServices::GetMimeTypeProvider ( us::ModuleContext *  context = us::GetModuleContext())
static

Get an IMimeTypeProvider instance.

Parameters
contextThe module context of the module getting the service.
Returns
A non-nullptr IMimeTypeProvider instance.

◆ GetNodeSelectionService()

static INodeSelectionService* mitk::CoreServices::GetNodeSelectionService ( us::ModuleContext *  context = us::GetModuleContext())
static

Get an INodeSelectionsService instance.

Parameters
contextThe module context of the module getting the service.
Returns
A non-nullptr INodeSelectionsService instance.

◆ GetPreferencesService()

static IPreferencesService* mitk::CoreServices::GetPreferencesService ( us::ModuleContext *  context = us::GetModuleContext())
static

Get an IPreferencesService instance.

Parameters
contextThe module context of the module getting the service.
Returns
A non-nullptr IPreferencesService instance.
See also
IPreferences

◆ GetPropertyAliases()

static IPropertyAliases* mitk::CoreServices::GetPropertyAliases ( us::ModuleContext *  context = us::GetModuleContext())
static

Get an IPropertyAliases instance.

Parameters
contextThe module context of the module getting the service.
Returns
A non-nullptr IPropertyAliases instance.

◆ GetPropertyDescriptions()

static IPropertyDescriptions* mitk::CoreServices::GetPropertyDescriptions ( us::ModuleContext *  context = us::GetModuleContext())
static

Get an IPropertyDescriptions instance.

Parameters
contextThe module context of the module getting the service.
Returns
A non-nullptr IPropertyDescriptions instance.

◆ GetPropertyDeserialization()

static IPropertyDeserialization* mitk::CoreServices::GetPropertyDeserialization ( us::ModuleContext *  context = us::GetModuleContext())
static

Get an IPropertyDeserialization instance.

Parameters
contextThe module context of the module getting the service.
Returns
A non-nullptr IPropertyDeserialization instance.

◆ GetPropertyExtensions()

static IPropertyExtensions* mitk::CoreServices::GetPropertyExtensions ( us::ModuleContext *  context = us::GetModuleContext())
static

Get an IPropertyExtensions instance.

Parameters
contextThe module context of the module getting the service.
Returns
A non-nullptr IPropertyExtensions instance.

◆ GetPropertyFilters()

static IPropertyFilters* mitk::CoreServices::GetPropertyFilters ( us::ModuleContext *  context = us::GetModuleContext())
static

Get an IPropertyFilters instance.

Parameters
contextThe module context of the module getting the service.
Returns
A non-nullptr IPropertyFilters instance.

◆ GetPropertyPersistence()

static IPropertyPersistence* mitk::CoreServices::GetPropertyPersistence ( us::ModuleContext *  context = us::GetModuleContext())
static

Get an IPropertyPersistence instance.

Parameters
contextThe module context of the module getting the service.
Returns
A non-nullptr IPropertyPersistence instance.

◆ GetPropertyRelations()

static IPropertyRelations* mitk::CoreServices::GetPropertyRelations ( us::ModuleContext *  context = us::GetModuleContext())
static

Get an IPropertyRelations instance.

Parameters
contextThe module context of the module getting the service.
Returns
A non-nullptr IPropertyRelations instance.

◆ Unget()

template<class S >
static bool mitk::CoreServices::Unget ( S *  service,
us::ModuleContext *  context = us::GetModuleContext() 
)
inlinestatic

Unget a previously acquired service instance.

Parameters
serviceThe service instance to be released.
context
Returns
true if ungetting the service was successful, false otherwise.

Definition at line 141 of file mitkCoreServices.h.

Referenced by mitk::CoreServicePointer< mitk::IPropertyFilters >::~CoreServicePointer().


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