Medical Imaging Interaction Toolkit  2023.12.00
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);
112  virtual void GetAllImages(float* distanceArray, float* amplitudeArray, float* intensityArray, char* sourceDataArray,
113  int requiredImageSequence, int& capturedImageSequence, unsigned char* rgbDataArray=nullptr);
117  KinectV2Controller::Pointer GetController();
118 
122  int GetRGBCaptureWidth();
126  int GetRGBCaptureHeight();
127 
128  protected:
129 
130  KinectV2Device();
131 
132  ~KinectV2Device();
133 
137  static ITK_THREAD_RETURN_TYPE Acquire(void* pInfoStruct);
138  static bool m_PrintFrameRate;
139 
140  KinectV2Controller::Pointer m_Controller;
141 
144  unsigned char** m_RGBDataBuffer;
145 
146 
147 
150 
152  };
153 } //END mitk namespace
154 #endif
mitk::KinectV2Device::m_AmplitudeDataBuffer
float ** m_AmplitudeDataBuffer
buffer holding the last amplitude images
Definition: mitkKinectV2Device.h:143
mitk::KinectV2Device::m_PolyData
vtkSmartPointer< vtkPolyData > m_PolyData
Surface generated via the Kinect V2 SDK with default/unknown calibration.
Definition: mitkKinectV2Device.h:151
mitk::KinectV2Device
Interface for all representations of Microsoft Kinect V2 devices. Kinect2Device internally holds an i...
Definition: mitkKinectV2Device.h:41
mitk::KinectV2Device::m_DepthBufferSize
size_t m_DepthBufferSize
Size of depth buffer (i.e. memory size of depth and infrared image)
Definition: mitkKinectV2Device.h:148
vtkSmartPointer< vtkPolyData >
mitk::KinectV2Device::m_RGBDataBuffer
unsigned char ** m_RGBDataBuffer
buffer holding the last RGB image
Definition: mitkKinectV2Device.h:144
mitk::KinectV2Device::m_DistanceDataBuffer
float ** m_DistanceDataBuffer
buffer holding the last distance images
Definition: mitkKinectV2Device.h:142
mitk::KinectV2Device::m_Controller
KinectV2Controller::Pointer m_Controller
corresponding CameraController
Definition: mitkKinectV2Device.h:140
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::KinectV2Device::m_PrintFrameRate
static bool m_PrintFrameRate
prints the framerate to the console every 100 frames, deactivated by default
Definition: mitkKinectV2Device.h:138
mitkKinectV2Controller.h
mitkCommon.h
mitkClassMacro
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:36
mitk::ToFCameraDevice
Virtual interface and base class for all Time-of-Flight devices.
Definition: mitkToFCameraDevice.h:37
mitk::KinectV2Device::m_RGBBufferSize
size_t m_RGBBufferSize
Size of RGB buffer (i.e. memory size of RGB image)
Definition: mitkKinectV2Device.h:149
mitkToFCameraDevice.h