16 #ifndef __mitkToFCameraDevice_h
17 #define __mitkToFCameraDevice_h
19 #include <MitkToFHardwareExports.h>
25 #include "itkObject.h"
26 #include "itkObjectFactory.h"
27 #include "itkMultiThreader.h"
28 #include "itkFastMutexLock.h"
50 virtual bool OnConnectCamera() = 0;
57 virtual bool ConnectCamera();
61 virtual bool DisconnectCamera() = 0;
66 virtual void StartCamera() = 0;
70 virtual void StopCamera();
74 virtual bool IsCameraActive();
78 virtual bool IsCameraConnected();
82 virtual void UpdateCamera() = 0;
89 virtual void GetAmplitudes(
float* amplitudeArray,
int& imageSequence) = 0;
95 virtual void GetIntensities(
float* intensityArray,
int& imageSequence) = 0;
101 virtual void GetDistances(
float* distanceArray,
int& imageSequence) = 0;
111 virtual void GetAllImages(
float* distanceArray,
float* amplitudeArray,
float* intensityArray,
char* sourceDataArray,
112 int requiredImageSequence,
int& capturedImageSequence,
unsigned char* rgbDataArray=NULL) = 0;
117 itkGetMacro(CaptureWidth,
int);
122 itkGetMacro(CaptureHeight,
int);
127 itkGetMacro(SourceDataSize,
int);
132 itkGetMacro(BufferSize,
int);
137 itkGetMacro(MaxBufferSize,
int);
142 void SetBoolProperty(
const char* propertyKey,
bool boolValue );
147 void SetIntProperty(
const char* propertyKey,
int intValue );
152 void SetFloatProperty(
const char* propertyKey,
float floatValue );
157 void SetStringProperty(
const char* propertyKey,
const char*
stringValue );
162 virtual void SetProperty(
const char *propertyKey,
BaseProperty* propertyValue );
167 virtual BaseProperty* GetProperty(
const char *propertyKey );
172 bool GetBoolProperty(
const char *propertyKey,
bool& boolValue);
177 bool GetStringProperty(
const char *propertyKey, std::string&
string);
182 bool GetIntProperty(
const char *propertyKey,
int& integer);
184 virtual int GetRGBCaptureWidth();
186 virtual int GetRGBCaptureHeight();
197 virtual void AllocatePixelArrays();
201 virtual void CleanupPixelArrays();
itk::SmartPointer< Self > Pointer
Virtual interface and base class for all Time-of-Flight devices.
int m_SourceDataSize
size of the PMD source data
int m_RGBPixelNumber
number of pixels in the range image (m_RGBImageWidth*m_RGBImageHeight)
float * m_IntensityArray
float array holding the intensity image
int m_PixelNumber
number of pixels in the range image (m_CaptureWidth*m_CaptureHeight)
DataCollection - Class to facilitate loading/accessing structured data.
PropertyList::Pointer m_PropertyList
a list of the corresponding properties
float * m_DistanceArray
float array holding the distance image
int m_ThreadID
ID of the started thread.
itk::FastMutexLock::Pointer m_CameraActiveMutex
mutex for the cameraActive flag
itk::MultiThreader::Pointer m_MultiThreader
itk::MultiThreader used for thread handling
int m_FreePos
current position in the buffer which will be filled with data acquired from the hardware ...
Abstract base class for properties.
int m_RGBImageHeight
height of the RGB image (y dimension)
bool m_CameraActive
flag indicating if the camera is currently active or not. Caution: thread safe access only! ...
int m_CurrentPos
current position in the buffer which will be retrieved by the Get methods
bool m_CameraConnected
flag indicating if the camera is successfully connected or not. Caution: thread safe access only! ...
#define mitkClassMacroItkParent(className, SuperClassName)
int m_CaptureWidth
width of the range image (x dimension)
itk::FastMutexLock::Pointer m_ImageMutex
mutex for images provided by the range camera
int m_BufferSize
buffer size of the image buffer needed for loss-less acquisition of range data
int m_MaxBufferSize
maximal buffer size needed for initialization of data arrays. Default value is 100.
int m_CaptureHeight
height of the range image (y dimension)
float * m_AmplitudeArray
float array holding the amplitude image
int m_RGBImageWidth
width of the RGB image (x dimension)
MITK_DECLARE_SERVICE_INTERFACE(mitk::ISimulationService,"org.mitk.ISimulationService")
int m_ImageSequence
counter for acquired images