Medical Imaging Interaction Toolkit  2021.10.00
Medical Imaging Interaction Toolkit
Go to the documentation of this file.
1 /*============================================================================
3 The Medical Imaging Interaction Toolkit (MITK)
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
11 ============================================================================*/
12 #ifndef __mitkToFCameraPMDController_h
13 #define __mitkToFCameraPMDController_h
15 #include <MitkPMDExports.h>
16 #include "mitkCommon.h"
19 #include "itkObject.h"
20 #include "itkObjectFactory.h"
22 namespace mitk
23 {
31  class MITKPMD_EXPORT ToFCameraPMDController : public itk::Object
32  {
33  public:
41  virtual bool OpenCameraConnection() = 0;
45  virtual bool CloseCameraConnection();
50  virtual bool GetAmplitudes(float* amplitudeArray);
56  virtual bool GetAmplitudes(char* sourceData, float* amplitudeArray);
61  virtual bool GetIntensities(float* intensityArray);
67  virtual bool GetIntensities(char* sourceData, float* intensityArray);
72  virtual bool GetDistances(float* distanceArray);
78  virtual bool GetDistances(char* sourceData, float* distanceArray);
83  virtual bool GetSourceData(char* sourceDataArray);
88  bool GetShortSourceData(short* sourceData);
94  virtual bool UpdateCamera();
99  virtual int GetModulationFrequency();
107  virtual int SetModulationFrequency(unsigned int modulationFrequency);
112  virtual int GetIntegrationTime();
120  virtual int SetIntegrationTime(unsigned int integrationTime);
124  virtual void SetInputFileName(std::string inputFileName);
129  itkGetMacro(CaptureWidth, unsigned int);
134  itkGetMacro(CaptureHeight, unsigned int);
139  itkGetMacro(InternalCaptureWidth, unsigned int);
144  itkGetMacro(InternalCaptureHeight, unsigned int);
146  itkGetMacro(SourceDataStructSize, int);
148  protected:
159  bool ErrorText(int error);
160  /*
161  \brief Abstract method that should be used to transform the camera output (e.g. flip / rotate / select region of interest).
162  To be implemented by subclasses
163  \param input data array of original size (m_CaptureWidth x m_CaptureHeight)
164  \param rotated output data array of reduced size (m_InternalCaptureWidth x m_InternalCaputureHeight)
165  \param isDist flag indicating whether the input contains PMD distance information
166  */
167  virtual void TransformCameraOutput(float* in, float* out, bool isDist)=0;
169  char m_PMDError[128];
170  int m_PMDRes;
174  unsigned int m_CaptureWidth;
175  unsigned int m_CaptureHeight;
176  unsigned int m_InternalCaptureWidth;
177  unsigned int m_InternalCaptureHeight;
184  std::string m_InputFileName;
188  char *m_ProcPlugin;
189  char *m_ProcParam;
191  private:
193  };
194 } //END mitk namespace
195 #endif
unsigned int m_InternalCaptureHeight
holds the height of the image in pixel as is it requested by the user (cf. TransformCameraOutput()) D...
char * m_ProcParam
holds processing parameter(s)
int m_PixelNumber
holds the number of pixels contained in the image
DataCollection - Class to facilitate loading/accessing structured data.
bool m_ConnectionCheck
flag showing whether the camera is connected (true) or not (false)
int m_NumberOfBytes
holds the number of bytes contained in the image
Virtual interface and base class for all PMD Time-of-Flight devices. Wraps PMD API provided in PMDSDK...
unsigned int m_CaptureHeight
holds the height of the image in pixel as it is originally acquired by the camera ...
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:45
char * m_ProcPlugin
holds name of processing plugin to be loaded (e.g. camcubeproc.W64.pap for CamCube 3...
unsigned int m_CaptureWidth
holds the width of the image in pixel as it is originally acquired by the camera
std::string m_InputFileName
input file name used by PMD player classes
int m_PMDRes
holds the current result message provided by PMD
int m_SourceDataStructSize
size of the PMD source data struct and the PMD source data
unsigned int m_InternalCaptureWidth
holds the width of the image in pixel as it is requested by the user (cf. TransformCameraOutput()) De...
char * m_SourceParam
holds source parameter(s)
int m_SourceDataSize
size of the original PMD source data
char * m_SourcePlugin
holds name of source plugin to be loaded (e.g. camcube3.W64.pap for CamCube 3.0 on Win64 platform) ...