Medical Imaging Interaction Toolkit  2023.04.00
Medical Imaging Interaction Toolkit
mitkAbstractToFDeviceFactory.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 #ifndef mitkAbstractToFDeviceFactory_h
13 #define mitkAbstractToFDeviceFactory_h
14 
15 #include <MitkToFHardwareExports.h>
16 #include "mitkIToFDeviceFactory.h"
17 
18 // Microservices
19 #include <usServiceRegistration.h>
20 #include <usModuleResource.h>
21 
22 namespace mitk
23 {
32 struct 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 
70 protected:
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
mitkIToFDeviceFactory.h
mitk::AbstractToFDeviceFactory::m_DeviceRegistrations
std::map< ToFCameraDevice *, us::ServiceRegistration< ToFCameraDevice > > m_DeviceRegistrations
m_DeviceRegistrations A map containing all the pairs of device registration numbers and devices.
Definition: mitkAbstractToFDeviceFactory.h:98
mitk
DataCollection - Class to facilitate loading/accessing structured data.
Definition: RenderingTests.dox:1
mitk::AbstractToFDeviceFactory::GetCurrentDeviceName
std::string GetCurrentDeviceName() override
GetCurrentDeviceName Get the human readable name of the current device. A factory can produce many de...
Definition: mitkAbstractToFDeviceFactory.h:56
usServiceRegistration.h
mitk::AbstractToFDeviceFactory::m_Devices
std::vector< ToFCameraDevice::Pointer > m_Devices
m_Devices A list (vector) containing all connected devices of the respective factory.
Definition: mitkAbstractToFDeviceFactory.h:93
us::ModuleResource
Definition: usModuleResource.h:55
usModuleResource.h
mitk::IToFDeviceFactory
This is the base of class for all ToFDeviceFactories.
Definition: mitkIToFDeviceFactory.h:29
mitk::AbstractToFDeviceFactory
Virtual interface and base class for all Time-of-Flight device factories. The basic interface is in t...
Definition: mitkAbstractToFDeviceFactory.h:32