Medical Imaging Interaction Toolkit  2016.11.0
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,
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 __mitkKinectV2Device_h
17 #define __mitkKinectV2Device_h
18 
19 #include <mitkCommon.h>
20 #include <MitkKinectV2Exports.h>
21 #include "mitkToFCameraDevice.h"
22 #include "mitkKinectV2Controller.h"
23 
24 #include <itkObject.h>
25 #include <itkObjectFactory.h>
26 #include <itkMultiThreader.h>
27 #include <itkFastMutexLock.h>
28 
29 #include <vtkSmartPointer.h>
30 #include <vtkPolyData.h>
31 
32 
33 namespace mitk
34 {
45  class MITKKINECTV2_EXPORT KinectV2Device : public ToFCameraDevice
46  {
47  public:
48 
50  itkFactorylessNewMacro(Self)
51  itkCloneMacro(Self)
52 
53 
57  virtual bool OnConnectCamera();
61  virtual bool DisconnectCamera();
67  virtual void StartCamera();
71  virtual void StopCamera();
76  virtual void UpdateCamera();
80  virtual bool IsCameraActive();
87  virtual void GetAmplitudes(float* amplitudeArray, int& imageSequence);
93  virtual void GetIntensities(float* intensityArray, int& imageSequence);
99  virtual void GetDistances(float* distanceArray, int& imageSequence);
109  virtual void GetAllImages(float* distanceArray, float* amplitudeArray, float* intensityArray, char* sourceDataArray,
110  int requiredImageSequence, int& capturedImageSequence, unsigned char* rgbDataArray=NULL);
114  KinectV2Controller::Pointer GetController();
115 
119  int GetRGBCaptureWidth();
123  int GetRGBCaptureHeight();
124 
125  protected:
126 
127  KinectV2Device();
128 
129  ~KinectV2Device();
130 
134  static ITK_THREAD_RETURN_TYPE Acquire(void* pInfoStruct);
135 
137 
140  unsigned char** m_RGBDataBuffer;
141 
144 
145  vtkSmartPointer<vtkPolyData> m_PolyData;
146  };
147 } //END mitk namespace
148 #endif
itk::SmartPointer< Self > Pointer
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)
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:44
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