MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
mitkKinectDeviceFactory.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 mitkKinectDeviceFactory_h
13#define mitkKinectDeviceFactory_h
14
15#include <MitkKinectExports.h>
16#include "mitkKinectDevice.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
29namespace mitk
30{
37 class MITKKINECT_EXPORT KinectDeviceFactory : public itk::LightObject, public AbstractToFDeviceFactory {
38
39 public:
40
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 {
90 us::Module* module = us::GetModuleContext()->GetModule();
91 return module->GetResource("CalibrationFiles/Kinect_RGB_camera.xml");
92 }
93 };
94}
95#endif
KinectDeviceFactory is an implementation of the factory pattern to generate Microsoft Kinect devices....
std::string GetDeviceNamePrefix()
GetDeviceNamePrefix Main part of a device name.
std::string GetFactoryName()
Get the name of the factory, here for the Kinect.
KinectDeviceFactory()
KinectDeviceFactory Default contructor. This factory internally counts all kinect devices starting at...
IGT Exceptions.
Virtual interface and base class for all Time-of-Flight device factories. The basic interface is in t...