Medical Imaging Interaction Toolkit  2021.10.99-9c07a326
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 (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 #ifndef __mitkUSActivator_h
14 #define __mitkUSActivator_h
15 
16 #include "mitkUSVideoDevice.h"
17 
18 // Microservices
19 #include <usModuleContext.h>
20 #include <usModuleActivator.h>
21 
22 namespace mitk
23 {
35 public:
36 
37  USActivator();
38  ~USActivator() override;
39 
43  void Load(us::ModuleContext* context) override;
44 
48  void Unload(us::ModuleContext* context) override;
49 
50 protected:
54  void OnServiceEvent(const us::ServiceEvent event);
55 
56  us::ModuleContext* m_Context;
57  std::vector<USDevice::Pointer> m_Devices;
58 };
59 } // namespace mitk
60 
62 
63 #endif // __mitkUSActivator_h
DataCollection - Class to facilitate loading/accessing structured data.
~USActivator() override
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...
#define US_EXPORT_MODULE_ACTIVATOR(_activator_type)
Export a module activator class.