12 #ifndef __mitkToFCameraDevice_h 13 #define __mitkToFCameraDevice_h 15 #include <MitkToFHardwareExports.h> 21 #include "itkObject.h" 22 #include "itkObjectFactory.h" 23 #include "itkMultiThreader.h" 24 #include "itkFastMutexLock.h" 46 virtual bool OnConnectCamera() = 0;
53 virtual bool ConnectCamera();
57 virtual bool DisconnectCamera() = 0;
62 virtual void StartCamera() = 0;
66 virtual void StopCamera();
70 virtual bool IsCameraActive();
74 virtual bool IsCameraConnected();
78 virtual void UpdateCamera() = 0;
85 virtual void GetAmplitudes(
float* amplitudeArray,
int& imageSequence) = 0;
91 virtual void GetIntensities(
float* intensityArray,
int& imageSequence) = 0;
97 virtual void GetDistances(
float* distanceArray,
int& imageSequence) = 0;
108 virtual void GetAllImages(
float* distanceArray,
float* amplitudeArray,
float* intensityArray,
char* sourceDataArray,
109 int requiredImageSequence,
int& capturedImageSequence,
unsigned char* rgbDataArray=
nullptr) = 0;
114 itkGetMacro(CaptureWidth,
int);
119 itkGetMacro(CaptureHeight,
int);
124 itkGetMacro(SourceDataSize,
int);
129 itkGetMacro(BufferSize,
int);
134 itkGetMacro(MaxBufferSize,
int);
139 void SetBoolProperty(
const char* propertyKey,
bool boolValue );
144 void SetIntProperty(
const char* propertyKey,
int intValue );
149 void SetFloatProperty(
const char* propertyKey,
float floatValue );
154 void SetStringProperty(
const char* propertyKey,
const char* stringValue );
159 virtual void SetProperty(
const char *propertyKey,
BaseProperty* propertyValue );
164 virtual BaseProperty* GetProperty(
const char *propertyKey );
169 bool GetBoolProperty(
const char *propertyKey,
bool& boolValue);
174 bool GetStringProperty(
const char *propertyKey, std::string&
string);
179 bool GetIntProperty(
const char *propertyKey,
int& integer);
181 virtual int GetRGBCaptureWidth();
183 virtual int GetRGBCaptureHeight();
194 virtual void AllocatePixelArrays();
198 virtual void CleanupPixelArrays();
#define MITK_DECLARE_SERVICE_INTERFACE(IFace, IId)
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)
int m_ImageSequence
counter for acquired images