Medical Imaging Interaction Toolkit  2018.4.99-3e3f1a6e
Medical Imaging Interaction Toolkit
mitkKinectDevice.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 __mitkKinectDevice_h
13 #define __mitkKinectDevice_h
14 
15 #include <MitkKinectExports.h>
16 #include "mitkCommon.h"
17 #include "mitkToFCameraDevice.h"
18 #include "mitkKinectController.h"
19 
20 #include "itkObject.h"
21 #include "itkObjectFactory.h"
22 #include "itkMultiThreader.h"
23 #include "itkFastMutexLock.h"
24 
25 
26 namespace mitk
27 {
38  class MITKKINECT_EXPORT KinectDevice : public ToFCameraDevice
39  {
40  public:
41 
43 
44  itkFactorylessNewMacro(Self);
45 
46  itkCloneMacro(Self);
47 
52  virtual bool OnConnectCamera();
56  virtual bool DisconnectCamera();
62  virtual void StartCamera();
66  virtual void StopCamera();
71  virtual void UpdateCamera();
75  virtual bool IsCameraActive();
82  virtual void GetAmplitudes(float* amplitudeArray, int& imageSequence);
88  virtual void GetIntensities(float* intensityArray, int& imageSequence);
94  virtual void GetDistances(float* distanceArray, int& imageSequence);
101  virtual void GetAllImages(float* distanceArray, float* amplitudeArray, float* intensityArray, char* sourceDataArray,
102  int requiredImageSequence, int& capturedImageSequence, unsigned char* rgbDataArray=nullptr);
106  KinectController::Pointer GetController();
107 
111  virtual void SetProperty( const char *propertyKey, BaseProperty* propertyValue );
115  int GetRGBCaptureWidth();
119  int GetRGBCaptureHeight();
120 
121  protected:
122 
123  KinectDevice();
124 
125  ~KinectDevice();
126 
130  static ITK_THREAD_RETURN_TYPE Acquire(void* pInfoStruct);
134  void GetNextPos();
135  KinectController::Pointer m_Controller;
136 
139  unsigned char** m_RGBDataBuffer;
140 
141  private:
142 
143  };
144 } //END mitk namespace
145 #endif
float ** m_DistanceDataBuffer
buffer holding the last distance images
float ** m_AmplitudeDataBuffer
buffer holding the last infra-red (IR) images
Virtual interface and base class for all Time-of-Flight devices.
DataCollection - Class to facilitate loading/accessing structured data.
Interface for all representations of Kinect devices. KinectDevice internally holds an instance of Kin...
Abstract base class for properties.
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:40
KinectController::Pointer m_Controller
corresponding CameraController
unsigned char ** m_RGBDataBuffer
buffer holding the last RGB image