Medical Imaging Interaction Toolkit
2023.04.00
Medical Imaging Interaction Toolkit
mitkKinectV2DeviceFactory.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 mitkKinectV2DeviceFactory_h
13
#define mitkKinectV2DeviceFactory_h
14
15
#include <MitkKinectV2Exports.h>
16
#include "
mitkKinectV2Device.h
"
17
#include "
mitkAbstractToFDeviceFactory.h
"
18
#include <
mitkCameraIntrinsics.h
>
19
#include <
mitkCameraIntrinsicsProperty.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
MITKKINECTV2_EXPORT
KinectV2DeviceFactory
:
public
itk::LightObject,
public
AbstractToFDeviceFactory
{
38
39
public
:
40
41
KinectV2DeviceFactory
()
42
{
43
}
44
49
std::string
GetFactoryName
()
50
{
51
return
std::string(
"Kinect V2 Factory"
);
52
}
62
std::string
GetDeviceNamePrefix
()
63
{
64
return
std::string(
"Kinect V2"
);
65
}
66
67
private
:
68
72
ToFCameraDevice::Pointer CreateToFCameraDevice()
73
{
74
KinectV2Device::Pointer device =
KinectV2Device::New
();
75
76
device->SetBoolProperty(
"HasRGBImage"
,
true
);
77
device->SetBoolProperty(
"HasAmplitudeImage"
,
true
);
78
device->SetBoolProperty(
"HasIntensityImage"
,
false
);
79
device->SetBoolProperty(
"KinectReconstructionMode"
,
true
);
80
device->SetBoolProperty(
"RGBImageHasDifferentResolution"
,
true
);
81
device->SetBoolProperty(
"HasSurface"
,
true
);
82
device->SetBoolProperty(
"HasTextureCoordinates"
,
true
);
83
device->SetBoolProperty(
"GenerateTriangularMesh"
,
false
);
84
85
device->SetFloatProperty(
"TriangulationThreshold"
, 0.0);
86
87
return
device.GetPointer();
88
}
89
90
us::ModuleResource
GetIntrinsicsResource()
91
{
92
us::Module
* module =
us::GetModuleContext
()->
GetModule
();
93
return
module->
GetResource
(
"CalibrationFiles/KinectV2_IR_camera.xml"
);
94
}
95
};
96
}
97
#endif
usModule.h
mitkKinectV2Device.h
mitk::KinectV2Device::New
static Pointer New()
mitk::KinectV2DeviceFactory
KinectDeviceFactory is an implementation of the factory pattern to generate Microsoft Kinect V2 devic...
Definition:
mitkKinectV2DeviceFactory.h:37
mitkCameraIntrinsics.h
mitk::KinectV2DeviceFactory::KinectV2DeviceFactory
KinectV2DeviceFactory()
Definition:
mitkKinectV2DeviceFactory.h:41
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
DataCollection - Class to facilitate loading/accessing structured data.
Definition:
RenderingTests.dox:1
mitkAbstractToFDeviceFactory.h
usModuleResourceStream.h
ModuleContext::GetModule
Module * GetModule() const
mitk::KinectV2DeviceFactory::GetFactoryName
std::string GetFactoryName()
GetFactoryName Get the name of the factory.
Definition:
mitkKinectV2DeviceFactory.h:49
us::Module
Definition:
usModule.h:78
usServiceRegistration.h
mitk::KinectV2DeviceFactory::GetDeviceNamePrefix
std::string GetDeviceNamePrefix()
GetDeviceNamePrefix Main part of a device name.
Definition:
mitkKinectV2DeviceFactory.h:62
us::ModuleResource
Definition:
usModuleResource.h:55
usModuleContext.h
usGetModuleContext.h
usModuleResource.h
mitk::AbstractToFDeviceFactory
Virtual interface and base class for all Time-of-Flight device factories. The basic interface is in t...
Definition:
mitkAbstractToFDeviceFactory.h:32
src
MITK
Modules
ToFHardware
KinectV2
mitkKinectV2DeviceFactory.h
Generated on Wed May 17 2023 16:26:08 for Medical Imaging Interaction Toolkit by
1.8.17