Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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,
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 __mitkToFCameraPMDController_h
17 #define __mitkToFCameraPMDController_h
18 
19 #include <MitkPMDExports.h>
20 #include "mitkCommon.h"
21 
22 
23 #include "itkObject.h"
24 #include "itkObjectFactory.h"
25 
26 namespace mitk
27 {
35  class MITKPMD_EXPORT ToFCameraPMDController : public itk::Object
36  {
37  public:
38 
40 
45  virtual bool OpenCameraConnection() = 0;
49  virtual bool CloseCameraConnection();
54  virtual bool GetAmplitudes(float* amplitudeArray);
60  virtual bool GetAmplitudes(char* sourceData, float* amplitudeArray);
65  virtual bool GetIntensities(float* intensityArray);
71  virtual bool GetIntensities(char* sourceData, float* intensityArray);
76  virtual bool GetDistances(float* distanceArray);
82  virtual bool GetDistances(char* sourceData, float* distanceArray);
87  virtual bool GetSourceData(char* sourceDataArray);
92  bool GetShortSourceData(short* sourceData);
93 
98  virtual bool UpdateCamera();
103  virtual int GetModulationFrequency();
111  virtual int SetModulationFrequency(unsigned int modulationFrequency);
116  virtual int GetIntegrationTime();
124  virtual int SetIntegrationTime(unsigned int integrationTime);
128  virtual void SetInputFileName(std::string inputFileName);
133  itkGetMacro(CaptureWidth, unsigned int);
138  itkGetMacro(CaptureHeight, unsigned int);
143  itkGetMacro(InternalCaptureWidth, unsigned int);
148  itkGetMacro(InternalCaptureHeight, unsigned int);
149 
150  itkGetMacro(SourceDataStructSize, int);
151 
152  protected:
153 
155 
157 
163  bool ErrorText(int error);
164  /*
165  \brief Abstract method that should be used to transform the camera output (e.g. flip / rotate / select region of interest).
166  To be implemented by subclasses
167  \param input data array of original size (m_CaptureWidth x m_CaptureHeight)
168  \param rotated output data array of reduced size (m_InternalCaptureWidth x m_InternalCaputureHeight)
169  \param isDist flag indicating whether the input contains PMD distance information
170  */
171  virtual void TransformCameraOutput(float* in, float* out, bool isDist)=0;
172 
173  char m_PMDError[128];
174  int m_PMDRes;
175 
178  unsigned int m_CaptureWidth;
179  unsigned int m_CaptureHeight;
180  unsigned int m_InternalCaptureWidth;
181  unsigned int m_InternalCaptureHeight;
182 
185 
187 
188  std::string m_InputFileName;
189 
192  char *m_ProcPlugin;
193  char *m_ProcParam;
194 
195  private:
196 
197  };
198 } //END mitk namespace
199 #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:53
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
static bool in(Reader::Char c, Reader::Char c1, Reader::Char c2, Reader::Char c3, Reader::Char c4)
Definition: jsoncpp.cpp:244
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) ...