MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
mitkToFCameraPMDController.h
Go to the documentation of this file.
1/*============================================================================
2
3The Medical Imaging Interaction Toolkit (MITK)
4
5Copyright (c) German Cancer Research Center (DKFZ)
6All rights reserved.
7
8Use of this source code is governed by a 3-clause BSD license that can be
9found in the LICENSE file.
10
11============================================================================*/
12#ifndef mitkToFCameraPMDController_h
13#define mitkToFCameraPMDController_h
14
15#include <MitkPMDExports.h>
16#include "mitkCommon.h"
17
18
19#include "itkObject.h"
20#include "itkObjectFactory.h"
21
22namespace mitk
23{
31 class MITKPMD_EXPORT ToFCameraPMDController : public itk::Object
32 {
33 public:
34
36
41 virtual bool OpenCameraConnection() = 0;
45 virtual bool CloseCameraConnection();
50 virtual bool GetAmplitudes(float* amplitudeArray);
56 virtual bool GetAmplitudes(char* sourceData, float* amplitudeArray);
61 virtual bool GetIntensities(float* intensityArray);
67 virtual bool GetIntensities(char* sourceData, float* intensityArray);
72 virtual bool GetDistances(float* distanceArray);
78 virtual bool GetDistances(char* sourceData, float* distanceArray);
83 virtual bool GetSourceData(char* sourceDataArray);
88 bool GetShortSourceData(short* sourceData);
89
94 virtual bool UpdateCamera();
99 virtual int GetModulationFrequency();
107 virtual int SetModulationFrequency(unsigned int modulationFrequency);
112 virtual int GetIntegrationTime();
120 virtual int SetIntegrationTime(unsigned int integrationTime);
124 virtual void SetInputFileName(std::string inputFileName);
129 itkGetMacro(CaptureWidth, unsigned int);
134 itkGetMacro(CaptureHeight, unsigned int);
139 itkGetMacro(InternalCaptureWidth, unsigned int);
144 itkGetMacro(InternalCaptureHeight, unsigned int);
145
146 itkGetMacro(SourceDataStructSize, int);
147
148 protected:
149
151
153
159 bool ErrorText(int error);
160 /*
161 \brief Abstract method that should be used to transform the camera output (e.g. flip / rotate / select region of interest).
162 To be implemented by subclasses
163 \param input data array of original size (m_CaptureWidth x m_CaptureHeight)
164 \param rotated output data array of reduced size (m_InternalCaptureWidth x m_InternalCaputureHeight)
165 \param isDist flag indicating whether the input contains PMD distance information
166 */
167 virtual void TransformCameraOutput(float* in, float* out, bool isDist)=0;
168
169 char m_PMDError[128];
171
174 unsigned int m_CaptureWidth;
175 unsigned int m_CaptureHeight;
178
181
183
184 std::string m_InputFileName;
185
190
191 private:
192
193 };
194} //END mitk namespace
195#endif
Virtual interface and base class for all PMD Time-of-Flight devices. Wraps PMD API provided in PMDSDK...
mitkClassMacroItkParent(ToFCameraPMDController, itk::Object)
int m_PMDRes
holds the current result message provided by PMD
virtual bool OpenCameraConnection()=0
opens a connection to the ToF camera. Has to be implemented by the sub class
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
itkGetMacro(CaptureHeight, unsigned int)
Access the resolution of the image in y direction.
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....
itkGetMacro(InternalCaptureHeight, unsigned int)
Access the chosen width of the resulting image in y direction.
std::string m_InputFileName
input file name used by PMD player classes
int m_NumberOfBytes
holds the number of bytes contained in the image
itkGetMacro(InternalCaptureWidth, unsigned int)
Access the chosen width of the resulting image in x direction.
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...
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...
itkGetMacro(SourceDataStructSize, int)
virtual void TransformCameraOutput(float *in, float *out, bool isDist)=0
itkGetMacro(CaptureWidth, unsigned int)
Access the resolution of the image in x direction.
IGT Exceptions.