Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkUSActivator.h
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 #ifndef __mitkUSActivator_h
18 #define __mitkUSActivator_h
19 
20 #include "mitkUSVideoDevice.h"
21 
22 // Microservices
23 #include <usModuleContext.h>
24 #include <usModuleActivator.h>
25 
26 namespace mitk
27 {
39 public:
40 
41  USActivator();
42  virtual ~USActivator();
43 
47  void Load(us::ModuleContext* context) override;
48 
52  void Unload(us::ModuleContext* context) override;
53 
54 protected:
58  void OnServiceEvent(const us::ServiceEvent event);
59 
60  us::ModuleContext* m_Context;
61  std::vector<USDevice::Pointer> m_Devices;
62 };
63 } // namespace mitk
64 
66 
67 #endif // __mitkUSActivator_h
DataCollection - Class to facilitate loading/accessing structured data.
void Load(us::ModuleContext *context) override
The mitk::USVideoDevice obejcts are loaded from hard disk and registered into micro service...
void OnServiceEvent(const us::ServiceEvent event)
Listens to ServiceRegistry changes and updates the list of mitk::USDevice object accordingly.
void Unload(us::ModuleContext *context) override
Registered mitk::USVideoDevice objects are stored to hard disk an deregistered from micro service...
us::ModuleContext * m_Context
std::vector< USDevice::Pointer > m_Devices
Module activator for the US module. Loads mitk::USVideoDevice objects from hard disk on module load a...
US_EXPORT_MODULE_ACTIVATOR(mitk::SimulationActivator)