Medical Imaging Interaction Toolkit  2016.11.0
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,
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 __mitkToFCameraPMDRawDataDevice_h
17 #define __mitkToFCameraPMDRawDataDevice_h
18 
19 #include <MitkPMDExports.h>
20 #include "mitkToFCameraDevice.h"
23 
24 namespace mitk
25 {
34  class MITKPMD_EXPORT ToFCameraPMDRawDataDevice : public ToFCameraDevice
35  {
36  public:
37 
39 
40  itkFactorylessNewMacro(Self)
41  itkCloneMacro(Self)
42 
43  itkSetMacro(ChannelSize, int);
44  itkGetMacro(ChannelSize, int);
48  virtual bool OnConnectCamera();
52  virtual bool DisconnectCamera();
57  virtual void StartCamera();
61  virtual void StopCamera();
65  virtual void UpdateCamera();
69  virtual bool IsCameraActive();
76  virtual void GetAmplitudes(float* amplitudeArray, int& imageSequence);
82  virtual void GetIntensities(float* intensityArray, int& imageSequence);
88  virtual void GetDistances(float* distanceArray, int& imageSequence);
98  virtual void GetAllImages(float* distanceArray, float* amplitudeArray, float* intensityArray, char* sourceDataArray,
99  int requiredImageSequence, int& capturedImageSequence, unsigned char* rgbDataArray=NULL);
103  ToFCameraPMDController::Pointer GetController();
104 
105  virtual void GetChannelSourceData(short* /*sourceData*/, vtkShortArray* /*vtkChannelArray*/ ){};
106 
110  virtual void SetProperty( const char *propertyKey, BaseProperty* propertyValue );
111 
112  protected:
113 
115 
117 
121  virtual void AllocateSourceData();
122 
126  virtual void CleanUpSourceData();
127 
131  virtual void AllocatePixelArrays();
135  virtual void CleanupPixelArrays();
139  static ITK_THREAD_RETURN_TYPE Acquire(void* pInfoStruct);
140 
144  void GetNextPos();
145 
154  void XYAxisFlipImage( float* imageData, float* &flippedData, int xAxis, int yAxis, int dimension = 1 );
155 
156  //member variables
162  unsigned int m_OriginControllerWidth;
164 
165  private:
166  int m_ChannelSize;
167 
168  };
169 } //END mitk namespace
170 #endif
itk::SmartPointer< Self > Pointer
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:44
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