Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
mitkOpenCLActivator.cpp
Go to the documentation of this file.
1 /*===================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #include "mitkOpenCLActivator.h"
18 
19 void OpenCLActivator::Load(us::ModuleContext *context)
20 {
21  // generate context
22  m_ResourceService.reset(new OclResourceServiceImpl);
24 
25  context->RegisterService<OclResourceService>(m_ResourceService.get(), props);
26 }
27 
28 void OpenCLActivator::Unload(us::ModuleContext *)
29 {
30  m_ResourceService.release();
31 }
32 
void Load(us::ModuleContext *context)
Load module context.
void Unload(us::ModuleContext *)
Unload module context.
Custom activator for the OpenCL Module in order to register and provide the OclResourceService.
US_UNORDERED_MAP_TYPE< std::string, Any > ServiceProperties
US_EXPORT_MODULE_ACTIVATOR(mitk::SimulationActivator)
Declaration of the OpenCL Resources micro-service.