21 #include "vnl/vnl_matrix.h"
24 #define SOURCE_PARAM ""
74 MITK_INFO <<
"Serial-No: " << serial <<std::endl;
75 MITK_INFO <<
"Datasource size: " << this->m_SourceDataSize <<std::endl;
86 std::stringstream command;
87 command<<
"SetSoftOffset "<<
offset;
88 this->m_PMDRes = pmdSourceCommand(
m_PMDHandle,0,0,command.str().c_str());
89 return ErrorText(this->m_PMDRes);
95 this->m_PMDRes = pmdSourceCommand(
m_PMDHandle, offset, 16,
"GetSoftOffset");
96 ErrorText(this->m_PMDRes);
103 unsigned int factor = leftUpperCornerX/3;
104 leftUpperCornerX = 3*factor;
107 std::stringstream command;
108 command<<
"SetROI "<<leftUpperCornerX<<
" "<<leftUpperCornerY<<
" "<<width<<
" "<<height;
109 this->m_PMDRes = pmdSourceCommand(
m_PMDHandle,0,0,command.str().c_str());
110 return ErrorText(this->m_PMDRes);
115 return this->SetRegionOfInterest(roi[0],roi[1],roi[2],roi[3]);
157 this->m_PMDRes = pmdSourceCommand(
m_PMDHandle, 0, 0,
"SetExposureMode Normal");
158 return ErrorText(this->m_PMDRes);
162 this->m_PMDRes = pmdSourceCommand(
m_PMDHandle, 0, 0,
"SetExposureMode SMB");
163 return ErrorText(this->m_PMDRes);
167 MITK_ERROR<<
"Specified exposure mode not supported. Exposure mode must be 0 (Normal) or 1 (SMB)";
174 std::stringstream commandStream;
175 commandStream<<
"SetFOV "<<fov;
176 this->m_PMDRes = pmdProcessingCommand(
m_PMDHandle, 0, 0, commandStream.str().c_str());
177 return ErrorText(this->m_PMDRes);
184 this->m_PMDRes=pmdSourceCommand(
m_PMDHandle,0,0,
"SetFPNCalibration On");
185 return this->ErrorText(this->m_PMDRes);
189 this->m_PMDRes=pmdSourceCommand(
m_PMDHandle,0,0,
"SetFPNCalibration Off");
190 return this->ErrorText(this->m_PMDRes);
198 this->m_PMDRes=pmdProcessingCommand(
m_PMDHandle,0,0,
"SetFPPNCalibration On");
199 return this->ErrorText(this->m_PMDRes);
203 this->m_PMDRes=pmdProcessingCommand(
m_PMDHandle,0,0,
"SetFPPNCalibration Off");
204 return this->ErrorText(this->m_PMDRes);
212 this->m_PMDRes=pmdProcessingCommand(
m_PMDHandle,0,0,
"SetLinearityCalibration On");
213 return this->ErrorText(this->m_PMDRes);
217 this->m_PMDRes=pmdProcessingCommand(
m_PMDHandle,0,0,
"SetLinearityCalibration Off");
218 return this->ErrorText(this->m_PMDRes);
226 this->m_PMDRes = pmdProcessingCommand(
m_PMDHandle, 0, 0,
"SetLensCalibration On");
227 return ErrorText(this->m_PMDRes);
231 this->m_PMDRes = pmdProcessingCommand(
m_PMDHandle, 0, 0,
"SetLensCalibration Off");
232 return ErrorText(this->m_PMDRes);
247 outMat.copy_out(out);
bool SetFPPNCalibration(bool on)
Enable/Disable PMD fixed pattern phase noise (FPPN) calibration.
unsigned int m_InternalCaptureHeight
holds the height of the image in pixel as is it requested by the user (cf. TransformCameraOutput()) D...
bool SetLinearityCalibration(bool on)
Enable/Disable PMD linearity calibration.
#define MITK_TOF_PMDCAMCUBE_SOURCE_PLUGIN
virtual bool UpdateCamera()
calls update on the camera -> a new ToF-image is aquired
bool SetFPNCalibration(bool on)
Enable/Disable PMD fixed pattern noise (FPN) calibration.
char * m_ProcParam
holds processing parameter(s)
int m_PixelNumber
holds the number of pixels contained in the image
DataCollection - Class to facilitate loading/accessing structured data.
bool SetExposureMode(int mode)
sets the exposure mode of the CamCube
~ToFCameraPMDCamCubeController()
#define MITK_TOF_PMDCAMCUBE_PROCESSING_PLUGIN
bool m_ConnectionCheck
flag showing whether the camera is connected (true) or not (false)
int m_NumberOfBytes
holds the number of bytes contained in the image
bool SetLensCalibration(bool on)
Enable/Disable PMD lens calibration.
ToFCameraPMDCamCubeController()
PMDDataDescription m_DataDescription
bool SetFieldOfView(float fov)
Sets the field of view of the camera lens.
virtual int GetIntegrationTime()
Returns the currently set integration time.
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...
virtual void TransformCameraOutput(float *in, float *out, bool isDist)
unsigned int m_CaptureHeight
holds the height of the image in pixel as it is originally acquired by the camera ...
virtual int GetModulationFrequency()
Returns the currently set modulation frequency.
bool ErrorText(int error)
Method printing the current error message to the console and returning whether the previous command w...
char * m_ProcPlugin
holds name of processing plugin to be loaded (e.g. camcubeproc.W64.pap for CamCube 3...
unsigned int m_CaptureWidth
holds the width of the image in pixel as it is originally acquired by the camera
virtual bool OpenCameraConnection()
opens a connection to the ToF camera and initializes the hardware specific members ...
int m_PMDRes
holds the current result message provided by PMD
int m_SourceDataStructSize
size of the PMD source data struct and the PMD source data
static bool in(Reader::Char c, Reader::Char c1, Reader::Char c2, Reader::Char c3, Reader::Char c4)
unsigned int m_InternalCaptureWidth
holds the width of the image in pixel as it is requested by the user (cf. TransformCameraOutput()) De...
float GetDistanceOffset()
returns the currently applied distance offset in m
char * m_SourceParam
holds source parameter(s)
bool SetDistanceOffset(float offset)
sets an additional distance offset which will be added to all distance values.
int m_SourceDataSize
size of the original PMD source data
unsigned int * GetRegionOfInterest()
returns the region of interest currently set
char * m_SourcePlugin
holds name of source plugin to be loaded (e.g. camcube3.W64.pap for CamCube 3.0 on Win64 platform) ...