Medical Imaging Interaction Toolkit  2023.12.00
Medical Imaging Interaction Toolkit
mitkKinectDeviceFactory.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 mitkKinectDeviceFactory_h
13 #define mitkKinectDeviceFactory_h
14 
15 #include <MitkKinectExports.h>
16 #include "mitkKinectDevice.h"
18 #include <mitkCameraIntrinsics.h>
20 
21 // Microservices
22 #include <usServiceRegistration.h>
23 #include <usModuleContext.h>
24 #include <usGetModuleContext.h>
25 #include <usModule.h>
26 #include <usModuleResource.h>
27 #include <usModuleResourceStream.h>
28 
29 namespace mitk
30 {
37  class MITKKINECT_EXPORT KinectDeviceFactory : public itk::LightObject, public AbstractToFDeviceFactory {
38 
39  public:
40 
46  {
47  }
51  std::string GetFactoryName()
52  {
53  return std::string("Kinect Factory");
54  }
55 
59  std::string GetDeviceNamePrefix()
60  {
61  return std::string("Kinect");
62  }
63 
64  private:
65 
69  ToFCameraDevice::Pointer CreateToFCameraDevice()
70  {
71  KinectDevice::Pointer device = KinectDevice::New();
72 
73  device->SetBoolProperty("HasRGBImage", true);
74  device->SetBoolProperty("HasAmplitudeImage", false);
75  device->SetBoolProperty("HasIntensityImage", false);
76  device->SetBoolProperty("KinectReconstructionMode", true);
77 
78  return device.GetPointer();
79  }
80 
88  us::ModuleResource GetIntrinsicsResource()
89  {
91  return module->GetResource("CalibrationFiles/Kinect_RGB_camera.xml");
92  }
93  };
94 }
95 #endif
usModule.h
mitkCameraIntrinsics.h
mitk::KinectDevice::New
static Pointer New()
us::GetModuleContext
static ModuleContext * GetModuleContext()
Returns the module context of the calling module.
Definition: usGetModuleContext.h:50
mitkCameraIntrinsicsProperty.h
us::Module::GetResource
ModuleResource GetResource(const std::string &path) const
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::KinectDeviceFactory::GetFactoryName
std::string GetFactoryName()
Get the name of the factory, here for the Kinect.
Definition: mitkKinectDeviceFactory.h:51
mitkAbstractToFDeviceFactory.h
usModuleResourceStream.h
ModuleContext::GetModule
Module * GetModule() const
us::Module
Definition: usModule.h:78
usServiceRegistration.h
us::ModuleResource
Definition: usModuleResource.h:55
mitkKinectDevice.h
mitk::KinectDeviceFactory::KinectDeviceFactory
KinectDeviceFactory()
KinectDeviceFactory Default contructor. This factory internally counts all kinect devices starting at...
Definition: mitkKinectDeviceFactory.h:45
usModuleContext.h
mitk::KinectDeviceFactory
KinectDeviceFactory is an implementation of the factory pattern to generate Microsoft Kinect devices....
Definition: mitkKinectDeviceFactory.h:37
usGetModuleContext.h
usModuleResource.h
mitk::KinectDeviceFactory::GetDeviceNamePrefix
std::string GetDeviceNamePrefix()
GetDeviceNamePrefix Main part of a device name.
Definition: mitkKinectDeviceFactory.h:59
mitk::AbstractToFDeviceFactory
Virtual interface and base class for all Time-of-Flight device factories. The basic interface is in t...
Definition: mitkAbstractToFDeviceFactory.h:32