MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
mitkAbstractToFDeviceFactory.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#ifndef mitkAbstractToFDeviceFactory_h
13#define mitkAbstractToFDeviceFactory_h
14
15#include <MitkToFHardwareExports.h>
17
18// Microservices
19#include <usServiceRegistration.h>
20#include <usModuleResource.h>
21
22namespace mitk
23{
32struct MITKTOFHARDWARE_EXPORT AbstractToFDeviceFactory : public IToFDeviceFactory {
33 public:
34
39 ToFCameraDevice::Pointer ConnectToFDevice();
40
45 void DisconnectToFDevice(const ToFCameraDevice::Pointer& device);
46
54 size_t GetNumberOfDevices();
55
56 std::string GetCurrentDeviceName() override
57 {
58 std::stringstream name;
59 if(this->GetNumberOfDevices()>1)
60 {
61 name << this->GetDeviceNamePrefix()<< " "<< this->GetNumberOfDevices();
62 }
63 else
64 {
65 name << this->GetDeviceNamePrefix();
66 }
67 return name.str();
68 }
69
70protected:
71
78 CameraIntrinsics::Pointer GetCameraIntrinsics();
79
87 virtual us::ModuleResource GetIntrinsicsResource();
88
93 std::vector<ToFCameraDevice::Pointer> m_Devices;
98 std::map<ToFCameraDevice*,us::ServiceRegistration<ToFCameraDevice> > m_DeviceRegistrations;
99};
100}
101#endif
IGT Exceptions.
Virtual interface and base class for all Time-of-Flight device factories. The basic interface is in t...
std::string GetCurrentDeviceName() override
GetCurrentDeviceName Get the human readable name of the current device. A factory can produce many de...
std::map< ToFCameraDevice *, us::ServiceRegistration< ToFCameraDevice > > m_DeviceRegistrations
m_DeviceRegistrations A map containing all the pairs of device registration numbers and devices.
std::vector< ToFCameraDevice::Pointer > m_Devices
m_Devices A list (vector) containing all connected devices of the respective factory.
This is the base of class for all ToFDeviceFactories.