Medical Imaging Interaction Toolkit  2018.4.99-f51274ea
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 {
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
std::vector< ToFCameraDevice::Pointer > m_Devices
m_Devices A list (vector) containing all connected devices of the respective factory.
Virtual interface and base class for all Time-of-Flight device factories. The basic interface is in t...
#define MITKTOFHARDWARE_EXPORT
DataCollection - Class to facilitate loading/accessing structured data.
std::string GetCurrentDeviceName() override
GetCurrentDeviceName Get the human readable name of the current device. A factory can produce many de...
This is the base of class for all ToFDeviceFactories.
std::map< ToFCameraDevice *, us::ServiceRegistration< ToFCameraDevice > > m_DeviceRegistrations
m_DeviceRegistrations A map containing all the pairs of device registration numbers and devices...