Medical Imaging Interaction Toolkit  2018.4.99-36d69b77
Medical Imaging Interaction Toolkit
mitkKinectV2Device.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 __mitkKinectV2Device_h
13 #define __mitkKinectV2Device_h
14 
15 #include <mitkCommon.h>
16 #include <MitkKinectV2Exports.h>
17 #include "mitkToFCameraDevice.h"
18 #include "mitkKinectV2Controller.h"
19 
20 #include <itkObject.h>
21 #include <itkObjectFactory.h>
22 #include <itkMultiThreader.h>
23 #include <itkFastMutexLock.h>
24 
25 #include <vtkSmartPointer.h>
26 #include <vtkPolyData.h>
27 
28 
29 namespace mitk
30 {
41  class MITKKINECTV2_EXPORT KinectV2Device : public ToFCameraDevice
42  {
43  public:
44 
46  itkFactorylessNewMacro(Self);
47  itkCloneMacro(Self)
53  itkSetMacro(PrintFrameRate, bool);
54 
59  virtual bool OnConnectCamera();
63  virtual bool DisconnectCamera();
69  virtual void StartCamera();
73  virtual void StopCamera();
78  virtual void UpdateCamera();
82  virtual bool IsCameraActive();
89  virtual void GetAmplitudes(float* amplitudeArray, int& imageSequence);
95  virtual void GetIntensities(float* intensityArray, int& imageSequence);
101  virtual void GetDistances(float* distanceArray, int& imageSequence);
111  virtual void GetAllImages(float* distanceArray, float* amplitudeArray, float* intensityArray, char* sourceDataArray,
112  int requiredImageSequence, int& capturedImageSequence, unsigned char* rgbDataArray=nullptr);
116  KinectV2Controller::Pointer GetController();
117 
121  int GetRGBCaptureWidth();
125  int GetRGBCaptureHeight();
126 
127  protected:
128 
129  KinectV2Device();
130 
131  ~KinectV2Device();
132 
136  static ITK_THREAD_RETURN_TYPE Acquire(void* pInfoStruct);
137  static bool m_PrintFrameRate;
138 
139  KinectV2Controller::Pointer m_Controller;
140 
143  unsigned char** m_RGBDataBuffer;
144 
145 
146 
149 
150  vtkSmartPointer<vtkPolyData> m_PolyData;
151  };
152 } //END mitk namespace
153 #endif
float ** m_DistanceDataBuffer
buffer holding the last distance images
Virtual interface and base class for all Time-of-Flight devices.
DataCollection - Class to facilitate loading/accessing structured data.
vcl_size_t m_RGBBufferSize
Size of RGB buffer (i.e. memory size of RGB image)
static bool m_PrintFrameRate
prints the framerate to the console every 100 frames, deactivated by default
vcl_size_t m_DepthBufferSize
Size of depth buffer (i.e. memory size of depth and infrared image)
KinectV2Controller::Pointer m_Controller
corresponding CameraController
unsigned char ** m_RGBDataBuffer
buffer holding the last RGB image
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:40
Interface for all representations of Microsoft Kinect V2 devices. Kinect2Device internally holds an i...
vtkSmartPointer< vtkPolyData > m_PolyData
Surface generated via the Kinect V2 SDK with default/unknown calibration.
float ** m_AmplitudeDataBuffer
buffer holding the last amplitude images