Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
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 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 | GetAmplitudes (char *sourceData, float *amplitudeArray) |
Calculates the current amplitude data from the raw source data using the processing plugin of the PMDSDK. More... | |
virtual bool | GetIntensities (float *intensityArray) |
Gets the current intensity array from the device. More... | |
virtual bool | GetIntensities (char *sourceData, float *intensityArray) |
Calculates the current intensity data from the raw source data using the processing plugin of the PMDSDK. More... | |
virtual bool | GetDistances (float *distanceArray) |
Gets the current distance array from the device. More... | |
virtual bool | GetDistances (char *sourceData, float *distanceArray) |
Calculates the current distance data from the raw source data using the processing plugin of the PMDSDK. More... | |
virtual bool | GetSourceData (char *sourceDataArray) |
Gets the PMD raw data from the ToF device. More... | |
bool | GetShortSourceData (short *sourceData) |
Convenience method to get the PMD raw data from the ToF device as short array. More... | |
virtual bool | UpdateCamera () |
calls update on the camera -> a new ToF-image is aquired More... | |
virtual int | GetModulationFrequency () |
Returns the currently set modulation frequency. More... | |
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. More... | |
virtual int | GetIntegrationTime () |
Returns the currently set integration time. More... | |
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. More... | |
virtual void | SetInputFileName (std::string inputFileName) |
set input file name used by PMD 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... | |
virtual unsigned int | GetInternalCaptureWidth () |
Access the chosen width of the resulting image in x direction. More... | |
virtual unsigned int | GetInternalCaptureHeight () |
Access the chosen width of the resulting image in y direction. More... | |
virtual int | GetSourceDataStructSize () |
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. More... | |
virtual void | TransformCameraOutput (float *in, float *out, bool isDist)=0 |
Protected Attributes | |
char | m_PMDError [128] |
member holding the current error text More... | |
int | m_PMDRes |
holds the current result message provided by PMD 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 as it is originally acquired by the camera More... | |
unsigned int | m_CaptureHeight |
holds the height of the image in pixel as it is originally acquired by the camera More... | |
unsigned int | m_InternalCaptureWidth |
holds the width of the image in pixel as it is requested by the user (cf. TransformCameraOutput()) Default: m_CaptureWidth More... | |
unsigned int | m_InternalCaptureHeight |
holds the height of the image in pixel as is it requested by the user (cf. TransformCameraOutput()) Default: m_CaptureHeight More... | |
int | m_SourceDataSize |
size of the original PMD source data More... | |
int | m_SourceDataStructSize |
size of the PMD source data struct and the PMD source data 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 PMD player classes More... | |
char * | m_SourcePlugin |
holds name of source plugin to be loaded (e.g. camcube3.W64.pap for CamCube 3.0 on Win64 platform) More... | |
char * | m_SourceParam |
holds source parameter(s) More... | |
char * | m_ProcPlugin |
holds name of processing plugin to be loaded (e.g. camcubeproc.W64.pap for CamCube 3.0 on Win64 platform) More... | |
char * | m_ProcParam |
holds processing parameter(s) More... | |
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 35 of file mitkToFCameraPMDController.h.
|
protected |
Definition at line 33 of file mitkToFCameraPMDController.cpp.
|
protected |
Definition at line 39 of file mitkToFCameraPMDController.cpp.
|
virtual |
closes the connection to the camera
Definition at line 43 of file mitkToFCameraPMDController.cpp.
References ErrorText(), m_ConnectionCheck, m_PMDHandle, and m_PMDRes.
|
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 51 of file mitkToFCameraPMDController.cpp.
References m_PMDError, m_PMDHandle, MITK_ERROR, and mitkThrow.
Referenced by CloseCameraConnection(), GetAmplitudes(), GetDistances(), GetIntegrationTime(), GetIntensities(), GetModulationFrequency(), GetShortSourceData(), GetSourceData(), mitk::ToFCameraPMDO3Controller::OpenCameraConnection(), mitk::ToFCameraPMDCamBoardController::OpenCameraConnection(), mitk::ToFCameraPMDCamCubeController::OpenCameraConnection(), mitk::ToFCameraPMDPlayerController::OpenCameraConnection(), SetIntegrationTime(), SetModulationFrequency(), and UpdateCamera().
|
virtual |
Gets the current amplitude array from the device.
amplitudeArray | float array where the amplitude data will be saved |
Definition at line 69 of file mitkToFCameraPMDController.cpp.
References ErrorText(), m_CaptureHeight, m_CaptureWidth, m_NumberOfBytes, m_PMDHandle, m_PMDRes, and TransformCameraOutput().
|
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 78 of file mitkToFCameraPMDController.cpp.
References ErrorText(), m_CaptureHeight, m_CaptureWidth, m_DataDescription, m_NumberOfBytes, m_PMDHandle, m_PMDRes, and TransformCameraOutput().
|
virtual |
Access the resolution of the image in y direction.
|
virtual |
Access the resolution of the image in x direction.
|
virtual |
Gets the current distance array from the device.
distanceArray | float array where the distance data will be saved |
Definition at line 105 of file mitkToFCameraPMDController.cpp.
References ErrorText(), m_CaptureHeight, m_CaptureWidth, m_NumberOfBytes, m_PMDHandle, m_PMDRes, and TransformCameraOutput().
|
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 114 of file mitkToFCameraPMDController.cpp.
References ErrorText(), m_CaptureHeight, m_CaptureWidth, m_DataDescription, m_NumberOfBytes, m_PMDHandle, m_PMDRes, and TransformCameraOutput().
|
virtual |
Returns the currently set integration time.
Definition at line 162 of file mitkToFCameraPMDController.cpp.
References ErrorText(), m_PMDHandle, and m_PMDRes.
Referenced by mitk::ToFCameraPMDO3Controller::OpenCameraConnection(), mitk::ToFCameraPMDCamCubeController::OpenCameraConnection(), mitk::ToFCameraPMDCamBoardController::OpenCameraConnection(), and mitk::ToFCameraPMDPlayerController::OpenCameraConnection().
|
virtual |
Gets the current intensity array from the device.
intensityArray | float array where the intensity data will be saved |
Definition at line 87 of file mitkToFCameraPMDController.cpp.
References ErrorText(), m_CaptureHeight, m_CaptureWidth, m_NumberOfBytes, m_PMDHandle, m_PMDRes, and TransformCameraOutput().
|
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 96 of file mitkToFCameraPMDController.cpp.
References ErrorText(), m_CaptureHeight, m_CaptureWidth, m_DataDescription, m_NumberOfBytes, m_PMDHandle, m_PMDRes, and TransformCameraOutput().
|
virtual |
Access the chosen width of the resulting image in y direction.
|
virtual |
Access the chosen width of the resulting image in x direction.
|
virtual |
Returns the currently set modulation frequency.
Definition at line 189 of file mitkToFCameraPMDController.cpp.
References ErrorText(), m_PMDHandle, and m_PMDRes.
Referenced by mitk::ToFCameraPMDO3Controller::OpenCameraConnection(), mitk::ToFCameraPMDCamCubeController::OpenCameraConnection(), mitk::ToFCameraPMDCamBoardController::OpenCameraConnection(), and mitk::ToFCameraPMDPlayerController::OpenCameraConnection().
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 135 of file mitkToFCameraPMDController.cpp.
References ErrorText(), m_DataDescription, m_PMDHandle, and m_PMDRes.
|
virtual |
Gets the PMD raw data from the ToF device.
sourceDataArray | array where the raw data will be saved |
Definition at line 123 of file mitkToFCameraPMDController.cpp.
References ErrorText(), m_DataDescription, m_PMDHandle, m_PMDRes, and m_SourceDataSize.
|
virtual |
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::ToFCameraPMDPlayerController, mitk::ToFCameraPMDCamBoardController, mitk::ToFCameraPMDCamCubeController, and mitk::ToFCameraPMDO3Controller.
|
virtual |
set input file name used by PMD player classes
Definition at line 197 of file mitkToFCameraPMDController.cpp.
References m_InputFileName.
|
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 143 of file mitkToFCameraPMDController.cpp.
References ErrorText(), m_ConnectionCheck, m_PMDHandle, m_PMDRes, and MITK_INFO.
|
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 170 of file mitkToFCameraPMDController.cpp.
References ErrorText(), m_ConnectionCheck, m_PMDHandle, m_PMDRes, and MITK_INFO.
|
protectedpure virtual |
Implemented in mitk::ToFCameraPMDCamCubeController, mitk::ToFCameraPMDCamBoardController, mitk::ToFCameraPMDPlayerController, and mitk::ToFCameraPMDO3Controller.
Referenced by GetAmplitudes(), GetDistances(), and GetIntensities().
|
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 63 of file mitkToFCameraPMDController.cpp.
References ErrorText(), m_PMDHandle, and m_PMDRes.
Referenced by mitk::ToFCameraPMDO3Controller::OpenCameraConnection(), mitk::ToFCameraPMDCamBoardController::OpenCameraConnection(), and mitk::ToFCameraPMDCamCubeController::OpenCameraConnection().
|
protected |
holds the height of the image in pixel as it is originally acquired by the camera
Definition at line 179 of file mitkToFCameraPMDController.h.
Referenced by GetAmplitudes(), GetDistances(), GetIntensities(), mitk::ToFCameraPMDO3Controller::OpenCameraConnection(), mitk::ToFCameraPMDCamBoardController::OpenCameraConnection(), mitk::ToFCameraPMDCamCubeController::OpenCameraConnection(), mitk::ToFCameraPMDPlayerController::OpenCameraConnection(), mitk::ToFCameraPMDO3Controller::TransformCameraOutput(), mitk::ToFCameraPMDCamBoardController::TransformCameraOutput(), and mitk::ToFCameraPMDCamCubeController::TransformCameraOutput().
|
protected |
holds the width of the image in pixel as it is originally acquired by the camera
Definition at line 178 of file mitkToFCameraPMDController.h.
Referenced by GetAmplitudes(), GetDistances(), GetIntensities(), mitk::ToFCameraPMDO3Controller::OpenCameraConnection(), mitk::ToFCameraPMDCamBoardController::OpenCameraConnection(), mitk::ToFCameraPMDCamCubeController::OpenCameraConnection(), mitk::ToFCameraPMDPlayerController::OpenCameraConnection(), mitk::ToFCameraPMDO3Controller::TransformCameraOutput(), mitk::ToFCameraPMDCamBoardController::TransformCameraOutput(), and mitk::ToFCameraPMDCamCubeController::TransformCameraOutput().
|
protected |
flag showing whether the camera is connected (true) or not (false)
Definition at line 186 of file mitkToFCameraPMDController.h.
Referenced by CloseCameraConnection(), mitk::ToFCameraPMDO3Controller::OpenCameraConnection(), mitk::ToFCameraPMDCamCubeController::OpenCameraConnection(), mitk::ToFCameraPMDCamBoardController::OpenCameraConnection(), SetIntegrationTime(), and SetModulationFrequency().
|
protected |
input file name used by PMD player classes
Definition at line 188 of file mitkToFCameraPMDController.h.
Referenced by mitk::ToFCameraPMDPlayerController::OpenCameraConnection(), and SetInputFileName().
|
protected |
holds the height of the image in pixel as is it requested by the user (cf. TransformCameraOutput()) Default: m_CaptureHeight
Definition at line 181 of file mitkToFCameraPMDController.h.
Referenced by mitk::ToFCameraPMDO3Controller::OpenCameraConnection(), mitk::ToFCameraPMDCamBoardController::OpenCameraConnection(), mitk::ToFCameraPMDCamCubeController::OpenCameraConnection(), mitk::ToFCameraPMDO3Controller::TransformCameraOutput(), mitk::ToFCameraPMDCamBoardController::TransformCameraOutput(), and mitk::ToFCameraPMDCamCubeController::TransformCameraOutput().
|
protected |
holds the width of the image in pixel as it is requested by the user (cf. TransformCameraOutput()) Default: m_CaptureWidth
Definition at line 180 of file mitkToFCameraPMDController.h.
Referenced by mitk::ToFCameraPMDO3Controller::OpenCameraConnection(), mitk::ToFCameraPMDCamBoardController::OpenCameraConnection(), mitk::ToFCameraPMDCamCubeController::OpenCameraConnection(), mitk::ToFCameraPMDO3Controller::TransformCameraOutput(), mitk::ToFCameraPMDCamBoardController::TransformCameraOutput(), and mitk::ToFCameraPMDCamCubeController::TransformCameraOutput().
|
protected |
holds the number of bytes contained in the image
Definition at line 177 of file mitkToFCameraPMDController.h.
Referenced by GetAmplitudes(), GetDistances(), GetIntensities(), mitk::ToFCameraPMDO3Controller::OpenCameraConnection(), mitk::ToFCameraPMDCamCubeController::OpenCameraConnection(), mitk::ToFCameraPMDCamBoardController::OpenCameraConnection(), and mitk::ToFCameraPMDPlayerController::OpenCameraConnection().
|
protected |
holds the number of pixels contained in the image
Definition at line 176 of file mitkToFCameraPMDController.h.
Referenced by mitk::ToFCameraPMDO3Controller::OpenCameraConnection(), mitk::ToFCameraPMDCamCubeController::OpenCameraConnection(), mitk::ToFCameraPMDCamBoardController::OpenCameraConnection(), and mitk::ToFCameraPMDPlayerController::OpenCameraConnection().
|
protected |
member holding the current error text
Definition at line 173 of file mitkToFCameraPMDController.h.
Referenced by ErrorText().
|
protected |
holds the current result message provided by PMD
Definition at line 174 of file mitkToFCameraPMDController.h.
Referenced by CloseCameraConnection(), GetAmplitudes(), GetDistances(), GetIntegrationTime(), GetIntensities(), GetModulationFrequency(), GetShortSourceData(), GetSourceData(), mitk::ToFCameraPMDO3Controller::OpenCameraConnection(), mitk::ToFCameraPMDCamBoardController::OpenCameraConnection(), mitk::ToFCameraPMDCamCubeController::OpenCameraConnection(), mitk::ToFCameraPMDPlayerController::OpenCameraConnection(), SetIntegrationTime(), SetModulationFrequency(), and UpdateCamera().
|
protected |
holds processing parameter(s)
Definition at line 193 of file mitkToFCameraPMDController.h.
Referenced by mitk::ToFCameraPMDO3Controller::OpenCameraConnection(), mitk::ToFCameraPMDCamCubeController::OpenCameraConnection(), mitk::ToFCameraPMDCamBoardController::OpenCameraConnection(), mitk::ToFCameraPMDPlayerController::OpenCameraConnection(), mitk::ToFCameraPMDCamBoardController::ToFCameraPMDCamBoardController(), mitk::ToFCameraPMDCamCubeController::ToFCameraPMDCamCubeController(), mitk::ToFCameraPMDO3Controller::ToFCameraPMDO3Controller(), and mitk::ToFCameraPMDPlayerController::ToFCameraPMDPlayerController().
|
protected |
holds name of processing plugin to be loaded (e.g. camcubeproc.W64.pap for CamCube 3.0 on Win64 platform)
Definition at line 192 of file mitkToFCameraPMDController.h.
Referenced by mitk::ToFCameraPMDO3Controller::OpenCameraConnection(), mitk::ToFCameraPMDCamCubeController::OpenCameraConnection(), mitk::ToFCameraPMDCamBoardController::OpenCameraConnection(), mitk::ToFCameraPMDPlayerController::OpenCameraConnection(), mitk::ToFCameraPMDCamBoardController::ToFCameraPMDCamBoardController(), mitk::ToFCameraPMDCamCubeController::ToFCameraPMDCamCubeController(), mitk::ToFCameraPMDO3Controller::ToFCameraPMDO3Controller(), and mitk::ToFCameraPMDPlayerController::ToFCameraPMDPlayerController().
|
protected |
size of the original PMD source data
Definition at line 183 of file mitkToFCameraPMDController.h.
Referenced by GetSourceData(), mitk::ToFCameraPMDO3Controller::OpenCameraConnection(), mitk::ToFCameraPMDCamCubeController::OpenCameraConnection(), mitk::ToFCameraPMDCamBoardController::OpenCameraConnection(), and mitk::ToFCameraPMDPlayerController::OpenCameraConnection().
|
protected |
size of the PMD source data struct and the PMD source data
Definition at line 184 of file mitkToFCameraPMDController.h.
Referenced by mitk::ToFCameraPMDO3Controller::OpenCameraConnection(), mitk::ToFCameraPMDCamCubeController::OpenCameraConnection(), mitk::ToFCameraPMDCamBoardController::OpenCameraConnection(), and mitk::ToFCameraPMDPlayerController::OpenCameraConnection().
|
protected |
holds source parameter(s)
Definition at line 191 of file mitkToFCameraPMDController.h.
Referenced by mitk::ToFCameraPMDO3Controller::OpenCameraConnection(), mitk::ToFCameraPMDCamCubeController::OpenCameraConnection(), mitk::ToFCameraPMDCamBoardController::OpenCameraConnection(), mitk::ToFCameraPMDCamBoardController::ToFCameraPMDCamBoardController(), mitk::ToFCameraPMDCamCubeController::ToFCameraPMDCamCubeController(), and mitk::ToFCameraPMDO3Controller::ToFCameraPMDO3Controller().
|
protected |
holds name of source plugin to be loaded (e.g. camcube3.W64.pap for CamCube 3.0 on Win64 platform)
Definition at line 190 of file mitkToFCameraPMDController.h.
Referenced by mitk::ToFCameraPMDO3Controller::OpenCameraConnection(), mitk::ToFCameraPMDCamCubeController::OpenCameraConnection(), mitk::ToFCameraPMDCamBoardController::OpenCameraConnection(), mitk::ToFCameraPMDPlayerController::OpenCameraConnection(), mitk::ToFCameraPMDCamBoardController::ToFCameraPMDCamBoardController(), mitk::ToFCameraPMDCamCubeController::ToFCameraPMDCamCubeController(), mitk::ToFCameraPMDO3Controller::ToFCameraPMDO3Controller(), and mitk::ToFCameraPMDPlayerController::ToFCameraPMDPlayerController().