MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
mitkUSActivator.h
Go to the documentation of this file.
1/*============================================================================
2
3The Medical Imaging Interaction Toolkit (MITK)
4
5Copyright (c) German Cancer Research Center (DKFZ)
6All rights reserved.
7
8Use of this source code is governed by a 3-clause BSD license that can be
9found 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
22namespace mitk
23{
34class USActivator : public us::ModuleActivator {
35public:
36
38 ~USActivator() override;
39
43 void Load(us::ModuleContext* context) override;
44
48 void Unload(us::ModuleContext* context) override;
49
50protected:
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
61US_EXPORT_MODULE_ACTIVATOR(mitk::USActivator)
62
63#endif
Module activator for the US module. Loads mitk::USVideoDevice objects from hard disk on module load a...
us::ModuleContext * m_Context
void OnServiceEvent(const us::ServiceEvent event)
Listens to ServiceRegistry changes and updates the list of mitk::USDevice object accordingly.
std::vector< USDevice::Pointer > m_Devices
void Load(us::ModuleContext *context) override
The mitk::USVideoDevice obejcts are loaded from hard disk and registered into micro service.
void Unload(us::ModuleContext *context) override
Registered mitk::USVideoDevice objects are stored to hard disk an deregistered from micro service.
IGT Exceptions.