Medical Imaging Interaction Toolkit  2016.11.0
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,
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 __mitkKinectDevice_h
17 #define __mitkKinectDevice_h
18 
19 #include <MitkKinectExports.h>
20 #include "mitkCommon.h"
21 #include "mitkToFCameraDevice.h"
22 #include "mitkKinectController.h"
23 
24 #include "itkObject.h"
25 #include "itkObjectFactory.h"
26 #include "itkMultiThreader.h"
27 #include "itkFastMutexLock.h"
28 
29 
30 namespace mitk
31 {
42  class MITKKINECT_EXPORT KinectDevice : public ToFCameraDevice
43  {
44  public:
45 
47 
48  itkFactorylessNewMacro(Self)
49  itkCloneMacro(Self)
50 
51 
55  virtual bool OnConnectCamera();
59  virtual bool DisconnectCamera();
65  virtual void StartCamera();
69  virtual void StopCamera();
74  virtual void UpdateCamera();
78  virtual bool IsCameraActive();
85  virtual void GetAmplitudes(float* amplitudeArray, int& imageSequence);
91  virtual void GetIntensities(float* intensityArray, int& imageSequence);
97  virtual void GetDistances(float* distanceArray, int& imageSequence);
104  virtual void GetAllImages(float* distanceArray, float* amplitudeArray, float* intensityArray, char* sourceDataArray,
105  int requiredImageSequence, int& capturedImageSequence, unsigned char* rgbDataArray=NULL);
109  KinectController::Pointer GetController();
110 
114  virtual void SetProperty( const char *propertyKey, BaseProperty* propertyValue );
118  int GetRGBCaptureWidth();
122  int GetRGBCaptureHeight();
123 
124  protected:
125 
126  KinectDevice();
127 
128  ~KinectDevice();
129 
133  static ITK_THREAD_RETURN_TYPE Acquire(void* pInfoStruct);
137  void GetNextPos();
139 
142  unsigned char** m_RGBDataBuffer;
143 
144  private:
145 
146  };
147 } //END mitk namespace
148 #endif
itk::SmartPointer< Self > Pointer
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:44
KinectController::Pointer m_Controller
corresponding CameraController
unsigned char ** m_RGBDataBuffer
buffer holding the last RGB image