13#include "mitkToFConfig.h"
14#include "mitkToFPMDConfig.h"
17#include "vnl/vnl_matrix.h"
20#define SOURCE_PARAM ""
70 MITK_INFO <<
"Serial-No: " << serial <<std::endl;
71 MITK_INFO <<
"Datasource size: " << this->m_SourceDataSize <<std::endl;
82 std::stringstream command;
83 command<<
"SetSoftOffset "<<offset;
84 this->m_PMDRes = pmdSourceCommand(
m_PMDHandle,0,0,command.str().c_str());
85 return ErrorText(this->m_PMDRes);
91 this->m_PMDRes = pmdSourceCommand(
m_PMDHandle, offset, 16,
"GetSoftOffset");
92 ErrorText(this->m_PMDRes);
99 unsigned int factor = leftUpperCornerX/3;
100 leftUpperCornerX = 3*factor;
103 std::stringstream command;
104 command<<
"SetROI "<<leftUpperCornerX<<
" "<<leftUpperCornerY<<
" "<<width<<
" "<<height;
105 this->m_PMDRes = pmdSourceCommand(
m_PMDHandle,0,0,command.str().c_str());
106 return ErrorText(this->m_PMDRes);
111 return this->SetRegionOfInterest(roi[0],roi[1],roi[2],roi[3]);
153 this->m_PMDRes = pmdSourceCommand(
m_PMDHandle, 0, 0,
"SetExposureMode Normal");
154 return ErrorText(this->m_PMDRes);
158 this->m_PMDRes = pmdSourceCommand(
m_PMDHandle, 0, 0,
"SetExposureMode SMB");
159 return ErrorText(this->m_PMDRes);
163 MITK_ERROR<<
"Specified exposure mode not supported. Exposure mode must be 0 (Normal) or 1 (SMB)";
170 std::stringstream commandStream;
171 commandStream<<
"SetFOV "<<fov;
172 this->m_PMDRes = pmdProcessingCommand(
m_PMDHandle, 0, 0, commandStream.str().c_str());
173 return ErrorText(this->m_PMDRes);
180 this->m_PMDRes=pmdSourceCommand(
m_PMDHandle,0,0,
"SetFPNCalibration On");
181 return this->ErrorText(this->m_PMDRes);
185 this->m_PMDRes=pmdSourceCommand(
m_PMDHandle,0,0,
"SetFPNCalibration Off");
186 return this->ErrorText(this->m_PMDRes);
194 this->m_PMDRes=pmdProcessingCommand(
m_PMDHandle,0,0,
"SetFPPNCalibration On");
195 return this->ErrorText(this->m_PMDRes);
199 this->m_PMDRes=pmdProcessingCommand(
m_PMDHandle,0,0,
"SetFPPNCalibration Off");
200 return this->ErrorText(this->m_PMDRes);
208 this->m_PMDRes=pmdProcessingCommand(
m_PMDHandle,0,0,
"SetLinearityCalibration On");
209 return this->ErrorText(this->m_PMDRes);
213 this->m_PMDRes=pmdProcessingCommand(
m_PMDHandle,0,0,
"SetLinearityCalibration Off");
214 return this->ErrorText(this->m_PMDRes);
222 this->m_PMDRes = pmdProcessingCommand(
m_PMDHandle, 0, 0,
"SetLensCalibration On");
223 return ErrorText(this->m_PMDRes);
227 this->m_PMDRes = pmdProcessingCommand(
m_PMDHandle, 0, 0,
"SetLensCalibration Off");
228 return ErrorText(this->m_PMDRes);
243 outMat.copy_out(out);
ToFCameraPMDCamCubeController()
unsigned int * GetRegionOfInterest()
returns the region of interest currently set
bool SetDistanceOffset(float offset)
sets an additional distance offset which will be added to all distance values.
bool SetLensCalibration(bool on)
Enable/Disable PMD lens calibration.
bool SetRegionOfInterest(unsigned int leftUpperCornerX, unsigned int leftUpperCornerY, unsigned int width, unsigned int height)
Setting the region of interest, the camera is configured to only output a certain area of the image.
bool SetFPNCalibration(bool on)
Enable/Disable PMD fixed pattern noise (FPN) calibration.
virtual void TransformCameraOutput(float *in, float *out, bool isDist)
bool SetExposureMode(int mode)
sets the exposure mode of the CamCube
virtual bool OpenCameraConnection()
opens a connection to the ToF camera and initializes the hardware specific members
float GetDistanceOffset()
returns the currently applied distance offset in m
bool SetLinearityCalibration(bool on)
Enable/Disable PMD linearity calibration.
bool SetFPPNCalibration(bool on)
Enable/Disable PMD fixed pattern phase noise (FPPN) calibration.
~ToFCameraPMDCamCubeController()
bool SetFieldOfView(float fov)
Sets the field of view of the camera lens.
virtual int GetIntegrationTime()
Returns the currently set integration time.
int m_PMDRes
holds the current result message provided by PMD
int m_SourceDataSize
size of the original PMD source data
char * m_SourceParam
holds source parameter(s)
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)
unsigned int m_CaptureHeight
holds the height of the image in pixel as it is originally acquired by the camera
char * m_ProcParam
holds processing parameter(s)
char * m_ProcPlugin
holds name of processing plugin to be loaded (e.g. camcubeproc.W64.pap for CamCube 3....
bool ErrorText(int error)
Method printing the current error message to the console and returning whether the previous command w...
int m_NumberOfBytes
holds the number of bytes contained in the image
int m_PixelNumber
holds the number of pixels contained in the image
unsigned int m_InternalCaptureHeight
holds the height of the image in pixel as is it requested by the user (cf. TransformCameraOutput()) D...
virtual int GetModulationFrequency()
Returns the currently set modulation frequency.
char * m_SourcePlugin
holds name of source plugin to be loaded (e.g. camcube3.W64.pap for CamCube 3.0 on Win64 platform)
unsigned int m_CaptureWidth
holds the width 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()) De...
virtual bool UpdateCamera()
calls update on the camera -> a new ToF-image is aquired
PMDDataDescription m_DataDescription
PMDDataDescription m_DataDescription