Medical Imaging Interaction Toolkit  2023.12.00
Medical Imaging Interaction Toolkit
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:
Collaboration diagram for mitk::ToFCameraMESAController:

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 More...
 
virtual bool CloseCameraConnection ()
 closes the connection to the camera More...
 
virtual bool GetAmplitudes (float *amplitudeArray)
 Gets the current amplitude array from the device. More...
 
virtual bool GetIntensities (float *intensityArray)
 Gets the current intensity array from the device. More...
 
virtual bool GetDistances (float *distanceArray)
 Gets the current distance array from the device. More...
 
virtual bool UpdateCamera ()
 calls update on the camera -> a new ToF-image is aquired More...
 
virtual int GetModulationFrequency ()=0
 Returns the currently set modulation frequency. More...
 
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. More...
 
virtual int GetIntegrationTime ()=0
 Returns the currently set integration time. More...
 
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. More...
 
virtual void SetInputFileName (std::string inputFileName)
 set input file name used by MESA player classes More...
 
virtual unsigned int GetCaptureWidth ()
 Access the resolution of the image in x direction. More...
 
virtual unsigned int GetCaptureHeight ()
 Access the resolution of the image in y direction. More...
 

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. More...
 

Protected Attributes

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

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

◆ ~ToFCameraMESAController()

mitk::ToFCameraMESAController::~ToFCameraMESAController ( )
protected

Member Function Documentation

◆ CloseCameraConnection()

virtual bool mitk::ToFCameraMESAController::CloseCameraConnection ( )
virtual

closes the connection to the camera

◆ 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)

◆ GetAmplitudes()

virtual 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

◆ GetCaptureHeight()

virtual unsigned int mitk::ToFCameraMESAController::GetCaptureHeight ( )
virtual

Access the resolution of the image in y direction.

Returns
height of image in pixel

◆ GetCaptureWidth()

virtual unsigned int mitk::ToFCameraMESAController::GetCaptureWidth ( )
virtual

Access the resolution of the image in x direction.

Returns
widht of image in pixel

◆ GetDistances()

virtual 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

◆ GetIntegrationTime()

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

Returns the currently set integration time.

Returns
integration time

Implemented in mitk::ToFCameraMESASR4000Controller.

◆ GetIntensities()

virtual 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

◆ GetModulationFrequency()

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

Returns the currently set modulation frequency.

Returns
modulation frequency

Implemented in mitk::ToFCameraMESASR4000Controller.

◆ 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()

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

set input file name used by MESA player classes

◆ 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()

virtual bool mitk::ToFCameraMESAController::UpdateCamera ( )
virtual

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

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 file: