Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
mitkIGTActivator.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 (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #include "mitkIGTConfig.h"
14 #include "mitkIGTActivator.h"
15 
16 //All Tracking devices, which should be available by default
20 #ifdef MITK_USE_MICRON_TRACKER
22 #endif
23 #ifdef MITK_USE_OPTITRACK_TRACKER
25 #endif
27 #ifdef MITK_USE_POLHEMUS_TRACKER
29 #endif
30 
31 namespace mitk
32 {
33 
35  {
36  }
37 
39  {
40  }
41 
42  void IGTActivator::Load(us::ModuleContext*)
43  {
44  m_DeviceTypeCollection.RegisterTrackingDeviceType(new mitk::NDIAuroraTypeInformation());
45  m_DeviceTypeCollection.RegisterTrackingDeviceType(new mitk::NDIPolarisTypeInformation());
48 #ifdef MITK_USE_OPTITRACK_TRACKER
50 #endif
51 #ifdef MITK_USE_MICRON_TRACKER
53 #endif
54 #ifdef MITK_USE_POLHEMUS_TRACKER
56 #endif
57  m_DeviceTypeCollection.RegisterAsMicroservice();
58  }
59 
60  void IGTActivator::Unload(us::ModuleContext*)
61  {
62  try
63  {
64  m_DeviceTypeCollection.UnRegisterMicroservice();
65  }
66  catch (std::exception& e)
67  {
68  MITK_WARN << "Unable to unregister IGT DeviceTypeCollection Microservice: "<<e.what();
69  }
70  }
71 
72 }
73 
void Unload(us::ModuleContext *) override
The load function of this class is executed every time, the module is loaded. Attention: no static va...
Type information for tracking devices using OpenIGTLink.
Type information for NDI Polaris.
DataCollection - Class to facilitate loading/accessing structured data.
Type information for Micron Tracking Devices.
#define MITK_WARN
Definition: mitkLogMacros.h:19
virtual void UnRegisterMicroservice()
Registers this object as a Microservice, making it available to every module and/or plugin...
Type information for a virtual tracker.
void Load(us::ModuleContext *) override
Type information for Polhemus Tracking Devices.
Type information for NDI Aurora.
void RegisterTrackingDeviceType(TrackingDeviceTypeInformation *typeInformation)
#define US_EXPORT_MODULE_ACTIVATOR(_activator_type)
Export a module activator class.
virtual void RegisterAsMicroservice()
Registers this object as a Microservice, making it available to every module and/or plugin...