Medical Imaging Interaction Toolkit  2018.4.99-12ad79a3
Medical Imaging Interaction Toolkit
mitkIGTUIActivator.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 "mitkIGTUIActivator.h"
15 
16 //All Tracking devices, which should be available by default
23 
24 //standard tracking devices, which always should be avaiable
25 #include "QmitkNDIAuroraWidget.h"
26 #include "QmitkNDIPolarisWidget.h"
28 #include "QmitkNPOptitrackWidget.h"
30 #include "QmitkOpenIGTLinkWidget.h"
31 
32 // Polhemus tracking device
33 #ifdef MITK_USE_POLHEMUS_TRACKER
36 #endif
37 
38 namespace mitk
39 {
41  {
42  }
43 
45  {
46  }
47 
48  void IGTUIActivator::Load(us::ModuleContext*)
49  {
50  m_DeviceWidgetCollection.RegisterAsMicroservice();
51  //Add widgets of standard tracking devices
58 #ifdef MITK_USE_POLHEMUS_TRACKER
60 #endif
61  }
62 
63  void IGTUIActivator::Unload(us::ModuleContext*)
64  {
65  try
66  {
67  m_DeviceWidgetCollection.UnRegisterMicroservice();
68  }
69  catch (std::exception& e)
70  {
71  MITK_WARN << "Unable to unregister IGTUI DeviceWidgetCollection Microservice: " << e.what();
72  }
73  }
74 }
75 
Implementation of a configuration widget for NDI Polaris Devices.
void Load(us::ModuleContext *) override
DataCollection - Class to facilitate loading/accessing structured data.
void Unload(us::ModuleContext *) override
Implementation of a configuration widget for NP Optitrack Tracking Devices.
#define MITK_WARN
Definition: mitkLogMacros.h:19
Implementation of a configuration widget for Polhemus Tracking Devices.
Implementation of a configuration widget to use an Open IGT Link connection to track any device...
The load function of this class is executed every time, the module is loaded. Attention: don&#39;t do any...
Implementation of a configuration widget for Micron Tracking Devices.
virtual void RegisterAsMicroservice()
Registers this object as a Microservice, making it available to every module and/or plugin...
virtual void UnRegisterMicroservice()
Registers this object as a Microservice, making it available to every module and/or plugin...
void RegisterTrackingDeviceWidget(TrackingDeviceType type, QmitkAbstractTrackingDeviceWidget *widget)
#define US_EXPORT_MODULE_ACTIVATOR(_activator_type)
Export a module activator class.
Implementation of a configuration widget for a Vitrual Tracking Device.
Implementation of a configuration widget for NDI Aurora Devices.