MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
mitk::ToFCameraMESAController Class Referenceabstract

Virtual interface and base class for all MESA Time-of-Flight devices. Wraps MESA API provided in library Provides methods for accessing current distance, amplitude, intensity and raw data. Allows to set parameters like modulation frequency and integration time. More...

#include <mitkToFCameraMESAController.h>

Inheritance diagram for mitk::ToFCameraMESAController:
mitk::ToFCameraMESASR4000Controller

Public Member Functions

 mitkClassMacroItkParent (ToFCameraMESAController, itk::Object)
 
virtual bool OpenCameraConnection ()=0
 opens a connection to the ToF camera. Has to be implemented by the sub class
 
virtual bool CloseCameraConnection ()
 closes the connection to the camera
 
virtual bool GetAmplitudes (float *amplitudeArray)
 Gets the current amplitude array from the device.
 
virtual bool GetIntensities (float *intensityArray)
 Gets the current intensity array from the device.
 
virtual bool GetDistances (float *distanceArray)
 Gets the current distance array from the device.
 
virtual bool UpdateCamera ()
 calls update on the camera -> a new ToF-image is aquired
 
virtual int GetModulationFrequency ()=0
 Returns the currently set modulation frequency.
 
virtual int SetModulationFrequency (unsigned int modulationFrequency)=0
 Sets the modulation frequency of the ToF device. The method automatically calculates a valid value from the given frequency to make sure that only valid frequencies are used.
 
virtual int GetIntegrationTime ()=0
 Returns the currently set integration time.
 
virtual int SetIntegrationTime (unsigned int integrationTime)=0
 Sets the integration time of the ToF device. The method automatically calculates a valid value from the given integration time to make sure that only valid times are used.
 
virtual void SetInputFileName (std::string inputFileName)
 set input file name used by MESA player classes
 
 itkGetMacro (CaptureWidth, unsigned int)
 Access the resolution of the image in x direction.
 
 itkGetMacro (CaptureHeight, unsigned int)
 Access the resolution of the image in y direction.
 

Protected Member Functions

 ToFCameraMESAController ()
 
 ~ToFCameraMESAController ()
 
bool ErrorText (int error)
 Method printing the current error message to the console and returning whether the previous command was successful.
 

Protected Attributes

char m_MESAError [128]
 member holding the current error text
 
int m_MESARes
 holds the current result message provided by MESA
 
int m_PixelNumber
 holds the number of pixels contained in the image
 
int m_NumberOfBytes
 holds the number of bytes contained in the image
 
unsigned int m_CaptureWidth
 holds the width of the image in pixel
 
unsigned int m_CaptureHeight
 holds the height of the image in pixel
 
int m_NumImg
 holds the number of images the camera provided (distance, intensity, etc)
 
float m_MaxRangeFactor
 holds the factor to calculate the real distance depends on the modulation frequency
 
bool m_ConnectionCheck
 flag showing whether the camera is connected (true) or not (false)
 
std::string m_InputFileName
 input file name used by MESA player classes
 

Detailed Description

Virtual interface and base class for all MESA Time-of-Flight devices. Wraps MESA API provided in library Provides methods for accessing current distance, amplitude, intensity and raw data. Allows to set parameters like modulation frequency and integration time.

Definition at line 30 of file mitkToFCameraMESAController.h.

Constructor & Destructor Documentation

◆ ToFCameraMESAController()

mitk::ToFCameraMESAController::ToFCameraMESAController ( )
protected

Definition at line 20 of file mitkToFCameraMESAController.cpp.

◆ ~ToFCameraMESAController()

mitk::ToFCameraMESAController::~ToFCameraMESAController ( )
protected

Definition at line 26 of file mitkToFCameraMESAController.cpp.

Member Function Documentation

◆ CloseCameraConnection()

bool mitk::ToFCameraMESAController::CloseCameraConnection ( )
virtual

closes the connection to the camera

Definition at line 30 of file mitkToFCameraMESAController.cpp.

◆ ErrorText()

bool mitk::ToFCameraMESAController::ErrorText ( int error)
protected

Method printing the current error message to the console and returning whether the previous command was successful.

Parameters
errorerror number returned by the MESA function
Returns
flag indicating if an error occured (false) or not (true)

Definition at line 38 of file mitkToFCameraMESAController.cpp.

◆ GetAmplitudes()

bool mitk::ToFCameraMESAController::GetAmplitudes ( float * amplitudeArray)
virtual

Gets the current amplitude array from the device.

Parameters
amplitudeArrayfloat array where the amplitude data will be saved

Definition at line 57 of file mitkToFCameraMESAController.cpp.

◆ GetDistances()

bool mitk::ToFCameraMESAController::GetDistances ( float * distanceArray)
virtual

Gets the current distance array from the device.

Parameters
distanceArrayfloat array where the distance data will be saved

Definition at line 88 of file mitkToFCameraMESAController.cpp.

◆ GetIntegrationTime()

virtual int mitk::ToFCameraMESAController::GetIntegrationTime ( )
pure virtual

Returns the currently set integration time.

Returns
integration time

Implemented in mitk::ToFCameraMESASR4000Controller.

◆ GetIntensities()

bool mitk::ToFCameraMESAController::GetIntensities ( float * intensityArray)
virtual

Gets the current intensity array from the device.

Parameters
intensityArrayfloat array where the intensity data will be saved

Definition at line 77 of file mitkToFCameraMESAController.cpp.

◆ GetModulationFrequency()

virtual int mitk::ToFCameraMESAController::GetModulationFrequency ( )
pure virtual

Returns the currently set modulation frequency.

Returns
modulation frequency

Implemented in mitk::ToFCameraMESASR4000Controller.

◆ itkGetMacro() [1/2]

mitk::ToFCameraMESAController::itkGetMacro ( CaptureHeight ,
unsigned int  )

Access the resolution of the image in y direction.

Returns
height of image in pixel

◆ itkGetMacro() [2/2]

mitk::ToFCameraMESAController::itkGetMacro ( CaptureWidth ,
unsigned int  )

Access the resolution of the image in x direction.

Returns
widht of image in pixel

◆ mitkClassMacroItkParent()

mitk::ToFCameraMESAController::mitkClassMacroItkParent ( ToFCameraMESAController ,
itk::Object  )

◆ OpenCameraConnection()

virtual bool mitk::ToFCameraMESAController::OpenCameraConnection ( )
pure virtual

opens a connection to the ToF camera. Has to be implemented by the sub class

Implemented in mitk::ToFCameraMESASR4000Controller.

◆ SetInputFileName()

void mitk::ToFCameraMESAController::SetInputFileName ( std::string inputFileName)
virtual

set input file name used by MESA player classes

Definition at line 115 of file mitkToFCameraMESAController.cpp.

◆ SetIntegrationTime()

virtual int mitk::ToFCameraMESAController::SetIntegrationTime ( unsigned int integrationTime)
pure virtual

Sets the integration time of the ToF device. The method automatically calculates a valid value from the given integration time to make sure that only valid times are used.

Parameters
integrationTimeintegration time
Returns
integration time set after validation step

Implemented in mitk::ToFCameraMESASR4000Controller.

◆ SetModulationFrequency()

virtual int mitk::ToFCameraMESAController::SetModulationFrequency ( unsigned int modulationFrequency)
pure virtual

Sets the modulation frequency of the ToF device. The method automatically calculates a valid value from the given frequency to make sure that only valid frequencies are used.

Parameters
modulationFrequencymodulation frequency
Returns
frequency set after validation step

Implemented in mitk::ToFCameraMESASR4000Controller.

◆ UpdateCamera()

bool mitk::ToFCameraMESAController::UpdateCamera ( )
virtual

calls update on the camera -> a new ToF-image is aquired

Definition at line 50 of file mitkToFCameraMESAController.cpp.

Member Data Documentation

◆ m_CaptureHeight

unsigned int mitk::ToFCameraMESAController::m_CaptureHeight
protected

holds the height of the image in pixel

Definition at line 123 of file mitkToFCameraMESAController.h.

◆ m_CaptureWidth

unsigned int mitk::ToFCameraMESAController::m_CaptureWidth
protected

holds the width of the image in pixel

Definition at line 122 of file mitkToFCameraMESAController.h.

◆ m_ConnectionCheck

bool mitk::ToFCameraMESAController::m_ConnectionCheck
protected

flag showing whether the camera is connected (true) or not (false)

Definition at line 129 of file mitkToFCameraMESAController.h.

◆ m_InputFileName

std::string mitk::ToFCameraMESAController::m_InputFileName
protected

input file name used by MESA player classes

Definition at line 131 of file mitkToFCameraMESAController.h.

◆ m_MaxRangeFactor

float mitk::ToFCameraMESAController::m_MaxRangeFactor
protected

holds the factor to calculate the real distance depends on the modulation frequency

Definition at line 127 of file mitkToFCameraMESAController.h.

◆ m_MESAError

char mitk::ToFCameraMESAController::m_MESAError[128]
protected

member holding the current error text

Definition at line 117 of file mitkToFCameraMESAController.h.

◆ m_MESARes

int mitk::ToFCameraMESAController::m_MESARes
protected

holds the current result message provided by MESA

Definition at line 118 of file mitkToFCameraMESAController.h.

◆ m_NumberOfBytes

int mitk::ToFCameraMESAController::m_NumberOfBytes
protected

holds the number of bytes contained in the image

Definition at line 121 of file mitkToFCameraMESAController.h.

◆ m_NumImg

int mitk::ToFCameraMESAController::m_NumImg
protected

holds the number of images the camera provided (distance, intensity, etc)

Definition at line 125 of file mitkToFCameraMESAController.h.

◆ m_PixelNumber

int mitk::ToFCameraMESAController::m_PixelNumber
protected

holds the number of pixels contained in the image

Definition at line 120 of file mitkToFCameraMESAController.h.


The documentation for this class was generated from the following files: