Medical Imaging Interaction Toolkit  2023.12.00
Medical Imaging Interaction Toolkit
mitkToFCameraPMDController.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 mitkToFCameraPMDController_h
13 #define mitkToFCameraPMDController_h
14 
15 #include <MitkPMDExports.h>
16 #include "mitkCommon.h"
17 
18 
19 #include "itkObject.h"
20 #include "itkObjectFactory.h"
21 
22 namespace mitk
23 {
31  class MITKPMD_EXPORT ToFCameraPMDController : public itk::Object
32  {
33  public:
34 
36 
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);
89 
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);
145 
146  itkGetMacro(SourceDataStructSize, int);
147 
148  protected:
149 
151 
153 
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;
168 
169  char m_PMDError[128];
170  int m_PMDRes;
171 
174  unsigned int m_CaptureWidth;
175  unsigned int m_CaptureHeight;
176  unsigned int m_InternalCaptureWidth;
177  unsigned int m_InternalCaptureHeight;
178 
181 
183 
184  std::string m_InputFileName;
185 
188  char *m_ProcPlugin;
189  char *m_ProcParam;
190 
191  private:
192 
193  };
194 } //END mitk namespace
195 #endif
mitk::ToFCameraPMDController::m_ProcParam
char * m_ProcParam
holds processing parameter(s)
Definition: mitkToFCameraPMDController.h:189
mitk::ToFCameraPMDController::m_PixelNumber
int m_PixelNumber
holds the number of pixels contained in the image
Definition: mitkToFCameraPMDController.h:172
mitk::ToFCameraPMDController::m_SourceDataSize
int m_SourceDataSize
size of the original PMD source data
Definition: mitkToFCameraPMDController.h:179
mitk::ToFCameraPMDController::m_InternalCaptureWidth
unsigned int m_InternalCaptureWidth
holds the width of the image in pixel as it is requested by the user (cf. TransformCameraOutput()) De...
Definition: mitkToFCameraPMDController.h:176
mitk::ToFCameraPMDController::m_SourceDataStructSize
int m_SourceDataStructSize
size of the PMD source data struct and the PMD source data
Definition: mitkToFCameraPMDController.h:180
mitk::ToFCameraPMDController::m_InputFileName
std::string m_InputFileName
input file name used by PMD player classes
Definition: mitkToFCameraPMDController.h:184
mitk::ToFCameraPMDController::m_PMDRes
int m_PMDRes
holds the current result message provided by PMD
Definition: mitkToFCameraPMDController.h:170
mitk::ToFCameraPMDController::m_CaptureHeight
unsigned int m_CaptureHeight
holds the height of the image in pixel as it is originally acquired by the camera
Definition: mitkToFCameraPMDController.h:175
mitkClassMacroItkParent
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:45
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::ToFCameraPMDController::m_CaptureWidth
unsigned int m_CaptureWidth
holds the width of the image in pixel as it is originally acquired by the camera
Definition: mitkToFCameraPMDController.h:174
mitk::ToFCameraPMDController::m_SourceParam
char * m_SourceParam
holds source parameter(s)
Definition: mitkToFCameraPMDController.h:187
mitk::ToFCameraPMDController::m_ConnectionCheck
bool m_ConnectionCheck
flag showing whether the camera is connected (true) or not (false)
Definition: mitkToFCameraPMDController.h:182
mitkCommon.h
mitk::ToFCameraPMDController::m_NumberOfBytes
int m_NumberOfBytes
holds the number of bytes contained in the image
Definition: mitkToFCameraPMDController.h:173
mitk::ToFCameraPMDController
Virtual interface and base class for all PMD Time-of-Flight devices. Wraps PMD API provided in PMDSDK...
Definition: mitkToFCameraPMDController.h:31
mitk::ToFCameraPMDController::m_SourcePlugin
char * m_SourcePlugin
holds name of source plugin to be loaded (e.g. camcube3.W64.pap for CamCube 3.0 on Win64 platform)
Definition: mitkToFCameraPMDController.h:186
mitk::ToFCameraPMDController::m_InternalCaptureHeight
unsigned int m_InternalCaptureHeight
holds the height of the image in pixel as is it requested by the user (cf. TransformCameraOutput()) D...
Definition: mitkToFCameraPMDController.h:177
mitk::ToFCameraPMDController::m_ProcPlugin
char * m_ProcPlugin
holds name of processing plugin to be loaded (e.g. camcubeproc.W64.pap for CamCube 3....
Definition: mitkToFCameraPMDController.h:188