Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitk::CoreServices Class Reference

Access MITK core services. More...

#include <mitkCoreServices.h>

Static Public Member Functions

static IShaderRepositoryGetShaderRepository ()
 Get an IShaderRepository 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 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 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-NULL 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 60 of file mitkCoreServices.h.

Member Function Documentation

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-NULL IPropertyAliases instance.

Definition at line 78 of file mitkCoreServices.cpp.

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

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-NULL IPropertyDescriptions instance.

Definition at line 83 of file mitkCoreServices.cpp.

Referenced by mitkPropertyDescriptionsTest(), and mitk::SurfaceVtkMapper3D::SetDefaultProperties().

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-NULL IPropertyExtensions instance.

Definition at line 88 of file mitkCoreServices.cpp.

Referenced by mitkPropertyExtensionsTest().

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-NULL IPropertyFilters instance.

Definition at line 93 of file mitkCoreServices.cpp.

Referenced by mitkPropertyFiltersTest(), and mitk::MultilabelObjectFactory::SetDefaultProperties().

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-NULL IPropertyPersistence instance.

Definition at line 98 of file mitkCoreServices.cpp.

Referenced by mitk::ItkImageIO::Read(), and mitk::ItkImageIO::Write().

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

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


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