Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 #ifndef __mitkKinectDeviceFactory_h
17 #define __mitkKinectDeviceFactory_h
18 
19 #include <MitkKinectExports.h>
20 #include "mitkKinectDevice.h"
22 #include <mitkCameraIntrinsics.h>
24 
25 // Microservices
26 #include <usServiceRegistration.h>
27 #include <usModuleContext.h>
28 #include <usGetModuleContext.h>
29 #include <usModule.h>
30 #include <usModuleResource.h>
31 #include <usModuleResourceStream.h>
32 
33 namespace mitk
34 {
41  class MITKKINECT_EXPORT KinectDeviceFactory : public itk::LightObject, public AbstractToFDeviceFactory {
42 
43  public:
44 
50  {
51  }
55  std::string GetFactoryName()
56  {
57  return std::string("Kinect Factory");
58  }
59 
63  std::string GetDeviceNamePrefix()
64  {
65  return std::string("Kinect");
66  }
67 
68  private:
69 
73  ToFCameraDevice::Pointer CreateToFCameraDevice()
74  {
76 
77  device->SetBoolProperty("HasRGBImage", true);
78  device->SetBoolProperty("HasAmplitudeImage", false);
79  device->SetBoolProperty("HasIntensityImage", false);
80  device->SetBoolProperty("KinectReconstructionMode", true);
81 
82  return device.GetPointer();
83  }
84 
92  us::ModuleResource GetIntrinsicsResource()
93  {
95  return module->GetResource("CalibrationFiles/Kinect_RGB_camera.xml");
96  }
97  };
98 }
99 #endif
itk::SmartPointer< Self > Pointer
std::string GetDeviceNamePrefix()
GetDeviceNamePrefix Main part of a device name.
Virtual interface and base class for all Time-of-Flight device factories. The basic interface is in t...
DataCollection - Class to facilitate loading/accessing structured data.
KinectDeviceFactory()
KinectDeviceFactory Default contructor. This factory internally counts all kinect devices starting at...
KinectDeviceFactory is an implementation of the factory pattern to generate Microsoft Kinect devices...
Module * GetModule() const
std::string GetFactoryName()
Get the name of the factory, here for the Kinect.
static Pointer New()
ModuleResource GetResource(const std::string &path) const
Definition: usModule.cpp:267
static ModuleContext * GetModuleContext()
Returns the module context of the calling module.