MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
mitkToFCameraMESAController.h
Go to the documentation of this file.
1/*============================================================================
2
3The Medical Imaging Interaction Toolkit (MITK)
4
5Copyright (c) German Cancer Research Center (DKFZ)
6All rights reserved.
7
8Use of this source code is governed by a 3-clause BSD license that can be
9found in the LICENSE file.
10
11============================================================================*/
12#ifndef mitkToFCameraMESAController_h
13#define mitkToFCameraMESAController_h
14
15#include <MitkMESASR4000ModuleExports.h>
16#include "mitkCommon.h"
17
18#include "itkObject.h"
19#include "itkObjectFactory.h"
20
21namespace mitk
22{
30 class MITKMESASR4000_EXPORT ToFCameraMESAController : public itk::Object
31 {
32 public:
33
35
39 virtual bool OpenCameraConnection() = 0;
43 virtual bool CloseCameraConnection();
48 virtual bool GetAmplitudes(float* amplitudeArray);
53 virtual bool GetIntensities(float* intensityArray);
58 virtual bool GetDistances(float* distanceArray);
62 virtual bool UpdateCamera();
67 virtual int GetModulationFrequency() = 0;
75 virtual int SetModulationFrequency(unsigned int modulationFrequency) = 0;
80 virtual int GetIntegrationTime() = 0;
88 virtual int SetIntegrationTime(unsigned int integrationTime) = 0;
92 virtual void SetInputFileName(std::string inputFileName);
97 itkGetMacro(CaptureWidth, unsigned int);
102 itkGetMacro(CaptureHeight, unsigned int);
103
104 protected:
105
107
109
115 bool ErrorText(int error);
116
117 char m_MESAError[128];
119
122 unsigned int m_CaptureWidth;
123 unsigned int m_CaptureHeight;
124
126
128
130
131 std::string m_InputFileName;
132
133 private:
134
135 };
136} //END mitk namespace
137#endif
Virtual interface and base class for all MESA Time-of-Flight devices. Wraps MESA API provided in libr...
virtual bool OpenCameraConnection()=0
opens a connection to the ToF camera. Has to be implemented by the sub class
std::string m_InputFileName
input file name used by MESA player classes
bool m_ConnectionCheck
flag showing whether the camera is connected (true) or not (false)
unsigned int m_CaptureWidth
holds the width of the image in pixel
virtual int GetModulationFrequency()=0
Returns the currently set modulation frequency.
virtual int SetIntegrationTime(unsigned int integrationTime)=0
Sets the integration time of the ToF device. The method automatically calculates a valid value from t...
unsigned int m_CaptureHeight
holds the height of the image in pixel
int m_PixelNumber
holds the number of pixels contained in the image
mitkClassMacroItkParent(ToFCameraMESAController, itk::Object)
int m_NumImg
holds the number of images the camera provided (distance, intensity, etc)
itkGetMacro(CaptureHeight, unsigned int)
Access the resolution of the image in y direction.
itkGetMacro(CaptureWidth, unsigned int)
Access the resolution of the image in x direction.
int m_NumberOfBytes
holds the number of bytes contained in the image
float m_MaxRangeFactor
holds the factor to calculate the real distance depends on the modulation frequency
virtual int SetModulationFrequency(unsigned int modulationFrequency)=0
Sets the modulation frequency of the ToF device. The method automatically calculates a valid value fr...
int m_MESARes
holds the current result message provided by MESA
virtual int GetIntegrationTime()=0
Returns the currently set integration time.
IGT Exceptions.