Medical Imaging Interaction Toolkit  2018.4.99-701c8286
Medical Imaging Interaction Toolkit
mitkToFCameraPMDRawDataDevice.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 __mitkToFCameraPMDRawDataDevice_h
13 #define __mitkToFCameraPMDRawDataDevice_h
14 
15 #include <MitkPMDExports.h>
16 #include "mitkToFCameraDevice.h"
19 
20 namespace mitk
21 {
30  class MITKPMD_EXPORT ToFCameraPMDRawDataDevice : public ToFCameraDevice
31  {
32  public:
33 
35 
36  itkFactorylessNewMacro(Self);
37 
38  itkCloneMacro(Self);
39 
40  itkSetMacro(ChannelSize, int);
41  itkGetMacro(ChannelSize, int);
45  virtual bool OnConnectCamera();
49  virtual bool DisconnectCamera();
54  virtual void StartCamera();
58  virtual void StopCamera();
62  virtual void UpdateCamera();
66  virtual bool IsCameraActive();
73  virtual void GetAmplitudes(float* amplitudeArray, int& imageSequence);
79  virtual void GetIntensities(float* intensityArray, int& imageSequence);
85  virtual void GetDistances(float* distanceArray, int& imageSequence);
95  virtual void GetAllImages(float* distanceArray, float* amplitudeArray, float* intensityArray, char* sourceDataArray,
96  int requiredImageSequence, int& capturedImageSequence, unsigned char* rgbDataArray=nullptr);
100  ToFCameraPMDController::Pointer GetController();
101 
102  virtual void GetChannelSourceData(short* /*sourceData*/, vtkShortArray* /*vtkChannelArray*/ ){};
103 
107  virtual void SetProperty( const char *propertyKey, BaseProperty* propertyValue );
108 
109  protected:
110 
112 
114 
118  virtual void AllocateSourceData();
119 
123  virtual void CleanUpSourceData();
124 
128  virtual void AllocatePixelArrays();
132  virtual void CleanupPixelArrays();
136  static ITK_THREAD_RETURN_TYPE Acquire(void* pInfoStruct);
137 
141  void GetNextPos();
142 
151  void XYAxisFlipImage( float* imageData, float* &flippedData, int xAxis, int yAxis, int dimension = 1 );
152 
153  //member variables
154  ToFCameraPMDController::Pointer m_Controller;
155  ThreadedToFRawDataReconstruction::Pointer m_RawDataSource;
159  unsigned int m_OriginControllerWidth;
161 
162  private:
163  int m_ChannelSize;
164 
165  };
166 } //END mitk namespace
167 #endif
char * m_SourceDataArray
array holding the current PMD source data
char ** m_SourceDataBuffer
buffer holding the last acquired images
Virtual interface and base class for all Time-of-Flight devices.
unsigned int m_OriginControllerHeight
holds the original controller height
DataCollection - Class to facilitate loading/accessing structured data.
Interface for all representations of PMD ToF devices. ToFCameraPMDDevice internally holds an instance...
Abstract base class for properties.
virtual void GetChannelSourceData(short *, vtkShortArray *)
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:40
ThreadedToFRawDataReconstruction::Pointer m_RawDataSource
ToFCameraPMDController::Pointer m_Controller
corresponding CameraController
short * m_ShortSourceData
array holding the current PMD raw data
unsigned int m_OriginControllerWidth
holds the original controller width