Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkToFCameraMITKPlayerDevice.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 __mitkToFCameraMITKPlayerDevice_h
17 #define __mitkToFCameraMITKPlayerDevice_h
18 
19 #include <MitkToFHardwareExports.h>
20 #include "mitkCommon.h"
21 #include "mitkToFCameraDevice.h"
23 
24 #include "itkObject.h"
25 #include "itkObjectFactory.h"
26 #include "itkMultiThreader.h"
27 #include "itkFastMutexLock.h"
28 
29 
30 namespace mitk
31 {
37  class MITKTOFHARDWARE_EXPORT ToFCameraMITKPlayerDevice : public ToFCameraDevice
38  {
39  public:
40 
42 
43  itkFactorylessNewMacro(Self)
44  itkCloneMacro(Self)
45 
46 
49  virtual bool OnConnectCamera() override;
53  virtual bool DisconnectCamera() override;
58  virtual void StartCamera() override;
65  virtual void GetAmplitudes(float* amplitudeArray, int& imageSequence) override;
71  virtual void GetIntensities(float* intensityArray, int& imageSequence) override;
77  virtual void GetRgb(unsigned char* rgbArray, int& imageSequence);
83  virtual void GetDistances(float* distanceArray, int& imageSequence) override;
93  virtual void GetAllImages(float* distanceArray, float* amplitudeArray, float* intensityArray, char* sourceDataArray,
94  int requiredImageSequence, int& capturedImageSequence, unsigned char* rgbDataArray=NULL) override;
99  virtual void SetInputFileName(std::string inputFileName);
100 
104  virtual void SetProperty( const char *propertyKey, BaseProperty* propertyValue ) override;
105 
106  protected:
107 
109 
114  virtual void UpdateCamera() override;
118  static ITK_THREAD_RETURN_TYPE Acquire(void* pInfoStruct);
122  void CleanUpDataBuffers();
126  void AllocateDataBuffers();
127 
129  std::string m_InputFileName;
130 
131  private:
132 
133  float** m_DistanceDataBuffer;
134  float** m_AmplitudeDataBuffer;
135  float** m_IntensityDataBuffer;
136  unsigned char** m_RGBDataBuffer;
137 
138  };
139 } //END mitk namespace
140 #endif
itk::SmartPointer< Self > Pointer
std::string m_InputFileName
member holding the file name of the current input file
Virtual interface and base class for all Time-of-Flight devices.
DataCollection - Class to facilitate loading/accessing structured data.
Abstract base class for properties.
Device class representing a player for MITK-ToF images.
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:44
ToFCameraMITKPlayerController::Pointer m_Controller
member holding the corresponding controller