MITK-IGT
IGT Extension of MITK
|
Virtual interface and base class for all PMD Time-of-Flight devices. Wraps PMD API provided in PMDSDK2 Provides methods for accessing current distance, amplitude, intensity and raw data. Allows to set parameters like modulation frequency and integration time. More...
#include <mitkToFCameraPMDController.h>
Public Member Functions | |
mitkClassMacroItkParent (ToFCameraPMDController, 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 | GetAmplitudes (char *sourceData, float *amplitudeArray) |
Calculates the current amplitude data from the raw source data using the processing plugin of the PMDSDK. | |
virtual bool | GetIntensities (float *intensityArray) |
Gets the current intensity array from the device. | |
virtual bool | GetIntensities (char *sourceData, float *intensityArray) |
Calculates the current intensity data from the raw source data using the processing plugin of the PMDSDK. | |
virtual bool | GetDistances (float *distanceArray) |
Gets the current distance array from the device. | |
virtual bool | GetDistances (char *sourceData, float *distanceArray) |
Calculates the current distance data from the raw source data using the processing plugin of the PMDSDK. | |
virtual bool | GetSourceData (char *sourceDataArray) |
Gets the PMD raw data from the ToF device. | |
bool | GetShortSourceData (short *sourceData) |
Convenience method to get the PMD raw data from the ToF device as short array. | |
virtual bool | UpdateCamera () |
calls update on the camera -> a new ToF-image is aquired | |
virtual int | GetModulationFrequency () |
Returns the currently set modulation frequency. | |
virtual int | SetModulationFrequency (unsigned int modulationFrequency) |
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 () |
Returns the currently set integration time. | |
virtual int | SetIntegrationTime (unsigned int integrationTime) |
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 PMD 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. | |
itkGetMacro (InternalCaptureWidth, unsigned int) | |
Access the chosen width of the resulting image in x direction. | |
itkGetMacro (InternalCaptureHeight, unsigned int) | |
Access the chosen width of the resulting image in y direction. | |
itkGetMacro (SourceDataStructSize, int) | |
Protected Member Functions | |
ToFCameraPMDController () | |
~ToFCameraPMDController () | |
bool | ErrorText (int error) |
Method printing the current error message to the console and returning whether the previous command was successful. | |
virtual void | TransformCameraOutput (float *in, float *out, bool isDist)=0 |
Protected Attributes | |
char | m_PMDError [128] |
member holding the current error text | |
int | m_PMDRes |
holds the current result message provided by PMD | |
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 as it is originally acquired by the camera | |
unsigned int | m_CaptureHeight |
holds the height of the image in pixel as it is originally acquired by the camera | |
unsigned int | m_InternalCaptureWidth |
holds the width of the image in pixel as it is requested by the user (cf. TransformCameraOutput()) Default: m_CaptureWidth | |
unsigned int | m_InternalCaptureHeight |
holds the height of the image in pixel as is it requested by the user (cf. TransformCameraOutput()) Default: m_CaptureHeight | |
int | m_SourceDataSize |
size of the original PMD source data | |
int | m_SourceDataStructSize |
size of the PMD source data struct and the PMD source data | |
bool | m_ConnectionCheck |
flag showing whether the camera is connected (true) or not (false) | |
std::string | m_InputFileName |
input file name used by PMD player classes | |
char * | m_SourcePlugin |
holds name of source plugin to be loaded (e.g. camcube3.W64.pap for CamCube 3.0 on Win64 platform) | |
char * | m_SourceParam |
holds source parameter(s) | |
char * | m_ProcPlugin |
holds name of processing plugin to be loaded (e.g. camcubeproc.W64.pap for CamCube 3.0 on Win64 platform) | |
char * | m_ProcParam |
holds processing parameter(s) | |
Virtual interface and base class for all PMD Time-of-Flight devices. Wraps PMD API provided in PMDSDK2 Provides methods for accessing current distance, amplitude, intensity and raw data. Allows to set parameters like modulation frequency and integration time.
Definition at line 31 of file mitkToFCameraPMDController.h.
|
protected |
Definition at line 29 of file mitkToFCameraPMDController.cpp.
|
protected |
Definition at line 35 of file mitkToFCameraPMDController.cpp.
|
virtual |
closes the connection to the camera
Definition at line 39 of file mitkToFCameraPMDController.cpp.
|
protected |
Method printing the current error message to the console and returning whether the previous command was successful.
error | error number returned by the PMD function |
Definition at line 47 of file mitkToFCameraPMDController.cpp.
|
virtual |
Calculates the current amplitude data from the raw source data using the processing plugin of the PMDSDK.
sourceData | raw data array |
amplitudeArray | float array where the amplitude data will be saved |
Definition at line 74 of file mitkToFCameraPMDController.cpp.
|
virtual |
Gets the current amplitude array from the device.
amplitudeArray | float array where the amplitude data will be saved |
Definition at line 65 of file mitkToFCameraPMDController.cpp.
|
virtual |
Calculates the current distance data from the raw source data using the processing plugin of the PMDSDK.
sourceData | raw data array |
distanceArray | float array where the distance data will be saved |
Definition at line 110 of file mitkToFCameraPMDController.cpp.
|
virtual |
Gets the current distance array from the device.
distanceArray | float array where the distance data will be saved |
Definition at line 101 of file mitkToFCameraPMDController.cpp.
|
virtual |
Returns the currently set integration time.
Definition at line 158 of file mitkToFCameraPMDController.cpp.
|
virtual |
Calculates the current intensity data from the raw source data using the processing plugin of the PMDSDK.
sourceData | raw data array |
intensityArray | float array where the intensity data will be saved |
Definition at line 92 of file mitkToFCameraPMDController.cpp.
|
virtual |
Gets the current intensity array from the device.
intensityArray | float array where the intensity data will be saved |
Definition at line 83 of file mitkToFCameraPMDController.cpp.
|
virtual |
Returns the currently set modulation frequency.
Definition at line 185 of file mitkToFCameraPMDController.cpp.
bool mitk::ToFCameraPMDController::GetShortSourceData | ( | short * | sourceData | ) |
Convenience method to get the PMD raw data from the ToF device as short array.
sourceData | array where the short raw data will be saved |
Definition at line 131 of file mitkToFCameraPMDController.cpp.
|
virtual |
Gets the PMD raw data from the ToF device.
sourceDataArray | array where the raw data will be saved |
Definition at line 119 of file mitkToFCameraPMDController.cpp.
mitk::ToFCameraPMDController::itkGetMacro | ( | CaptureHeight | , |
unsigned int | ) |
Access the resolution of the image in y direction.
mitk::ToFCameraPMDController::itkGetMacro | ( | CaptureWidth | , |
unsigned int | ) |
Access the resolution of the image in x direction.
mitk::ToFCameraPMDController::itkGetMacro | ( | InternalCaptureHeight | , |
unsigned int | ) |
Access the chosen width of the resulting image in y direction.
mitk::ToFCameraPMDController::itkGetMacro | ( | InternalCaptureWidth | , |
unsigned int | ) |
Access the chosen width of the resulting image in x direction.
mitk::ToFCameraPMDController::itkGetMacro | ( | SourceDataStructSize | , |
int | ) |
mitk::ToFCameraPMDController::mitkClassMacroItkParent | ( | ToFCameraPMDController | , |
itk::Object | ) |
|
pure virtual |
opens a connection to the ToF camera. Has to be implemented by the sub class
mitkException | In case of no connection, an exception is thrown! |
Implemented in mitk::ToFCameraPMDCamBoardController, mitk::ToFCameraPMDCamCubeController, mitk::ToFCameraPMDO3Controller, and mitk::ToFCameraPMDPlayerController.
|
virtual |
set input file name used by PMD player classes
Definition at line 193 of file mitkToFCameraPMDController.cpp.
|
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.
integrationTime | integration time |
Reimplemented in mitk::ToFCameraPMDPlayerController.
Definition at line 139 of file mitkToFCameraPMDController.cpp.
|
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.
modulationFrequency | modulation frequency |
Reimplemented in mitk::ToFCameraPMDPlayerController.
Definition at line 166 of file mitkToFCameraPMDController.cpp.
|
protectedpure virtual |
|
virtual |
calls update on the camera -> a new ToF-image is aquired
mitkException | In case of no connection, an exception is thrown! |
Definition at line 59 of file mitkToFCameraPMDController.cpp.
|
protected |
holds the height of the image in pixel as it is originally acquired by the camera
Definition at line 175 of file mitkToFCameraPMDController.h.
|
protected |
holds the width of the image in pixel as it is originally acquired by the camera
Definition at line 174 of file mitkToFCameraPMDController.h.
|
protected |
flag showing whether the camera is connected (true) or not (false)
Definition at line 182 of file mitkToFCameraPMDController.h.
|
protected |
input file name used by PMD player classes
Definition at line 184 of file mitkToFCameraPMDController.h.
|
protected |
holds the height of the image in pixel as is it requested by the user (cf. TransformCameraOutput()) Default: m_CaptureHeight
Definition at line 177 of file mitkToFCameraPMDController.h.
|
protected |
holds the width of the image in pixel as it is requested by the user (cf. TransformCameraOutput()) Default: m_CaptureWidth
Definition at line 176 of file mitkToFCameraPMDController.h.
|
protected |
holds the number of bytes contained in the image
Definition at line 173 of file mitkToFCameraPMDController.h.
|
protected |
holds the number of pixels contained in the image
Definition at line 172 of file mitkToFCameraPMDController.h.
|
protected |
member holding the current error text
Definition at line 169 of file mitkToFCameraPMDController.h.
|
protected |
holds the current result message provided by PMD
Definition at line 170 of file mitkToFCameraPMDController.h.
|
protected |
holds processing parameter(s)
Definition at line 189 of file mitkToFCameraPMDController.h.
|
protected |
holds name of processing plugin to be loaded (e.g. camcubeproc.W64.pap for CamCube 3.0 on Win64 platform)
Definition at line 188 of file mitkToFCameraPMDController.h.
|
protected |
size of the original PMD source data
Definition at line 179 of file mitkToFCameraPMDController.h.
|
protected |
size of the PMD source data struct and the PMD source data
Definition at line 180 of file mitkToFCameraPMDController.h.
|
protected |
holds source parameter(s)
Definition at line 187 of file mitkToFCameraPMDController.h.
|
protected |
holds name of source plugin to be loaded (e.g. camcube3.W64.pap for CamCube 3.0 on Win64 platform)
Definition at line 186 of file mitkToFCameraPMDController.h.