Medical Imaging Interaction Toolkit  2018.4.99-f51274ea
Medical Imaging Interaction Toolkit
mitk::CoreServices Class Reference

Access MITK core services. More...

#include <mitkCoreServices.h>

Static Public Member Functions

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 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...
 
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 56 of file mitkCoreServices.h.

Member Function Documentation

◆ GetMimeTypeProvider()

◆ GetPropertyAliases()

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.

Definition at line 67 of file mitkCoreServices.cpp.

Referenced by mitk::PlaneGeometryDataMapper2D::SetDefaultProperties(), and mitk::SurfaceVtkMapper2D::SetDefaultProperties().

◆ GetPropertyDescriptions()

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.

Definition at line 72 of file mitkCoreServices.cpp.

Referenced by mitk::SurfaceVtkMapper3D::SetDefaultProperties().

◆ GetPropertyExtensions()

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.

Definition at line 77 of file mitkCoreServices.cpp.

Referenced by QmitkPropertyItemDelegate::createEditor().

◆ GetPropertyFilters()

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.

Definition at line 82 of file mitkCoreServices.cpp.

Referenced by mitk::MultilabelObjectFactory::SetDefaultProperties().

◆ GetPropertyPersistence()

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

◆ GetPropertyRelations()

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.

Definition at line 92 of file mitkCoreServices.cpp.

◆ 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.
Returns
true if ungetting the service was successful, false otherwise.

Definition at line 115 of file mitkCoreServices.h.

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


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