13#include <itksys/SystemTools.hxx>
18 m_CaptureWidth(204),m_CaptureHeight(204),m_PixelNumber(41616),m_SourceDataSize(0),
19 m_CameraActive(false),m_CameraConnected(false),m_ImageSequence(0)
44 SetProperty(propertyKey, mitk::BoolProperty::New(boolValue));
49 SetProperty(propertyKey, mitk::IntProperty::New(intValue));
54 SetProperty(propertyKey, mitk::FloatProperty::New(floatValue));
59 SetProperty(propertyKey, mitk::StringProperty::New(stringValue));
74 mitk::BoolProperty::Pointer boolprop =
dynamic_cast<mitk::BoolProperty*
>(this->
GetProperty(propertyKey));
78 boolValue = boolprop->GetValue();
84 mitk::StringProperty::Pointer stringProp =
dynamic_cast<mitk::StringProperty*
>(this->
GetProperty(propertyKey));
85 if(stringProp.IsNull())
91 string = stringProp->GetValue();
97 mitk::IntProperty::Pointer intProp =
dynamic_cast<mitk::IntProperty*
>(this->
GetProperty(propertyKey));
104 integer = intProp->GetValue();
153 itksys::SystemTools::Delay(100);
157 itksys::SystemTools::Delay(100);
PropertyList::Pointer m_PropertyList
a list of the corresponding properties
virtual void SetProperty(const char *propertyKey, BaseProperty *propertyValue)
set a BaseProperty property in the property list
int m_CaptureWidth
width of the range image (x dimension)
virtual bool ConnectCamera()
ConnectCamera Internally calls OnConnectCamera() of the respective device implementation.
void SetBoolProperty(const char *propertyKey, bool boolValue)
set a bool property in the property list
bool GetStringProperty(const char *propertyKey, std::string &string)
get a string from the property list
virtual BaseProperty * GetProperty(const char *propertyKey)
get a BaseProperty from the property list
virtual void CleanupPixelArrays()
method for cleanup memory allocated for pixel arrays m_IntensityArray, m_DistanceArray and m_Amplitud...
void SetIntProperty(const char *propertyKey, int intValue)
set an int property in the property list
int m_RGBImageWidth
width of the RGB image (x dimension)
virtual bool IsCameraActive()
returns true if the camera is connected and started
virtual bool OnConnectCamera()=0
Opens a connection to the ToF camera. Has to be implemented in the specialized inherited classes.
virtual void AllocatePixelArrays()
method for allocating memory for pixel arrays m_IntensityArray, m_DistanceArray and m_AmplitudeArray
virtual int GetRGBCaptureHeight()
bool GetBoolProperty(const char *propertyKey, bool &boolValue)
get a bool from the property list
int m_PixelNumber
number of pixels in the range image (m_CaptureWidth*m_CaptureHeight)
bool GetIntProperty(const char *propertyKey, int &integer)
get an int from the property list
virtual int GetRGBCaptureWidth()
bool m_CameraConnected
flag indicating if the camera is successfully connected or not. Caution: thread safe access only!
int m_CaptureHeight
height of the range image (y dimension)
void SetStringProperty(const char *propertyKey, const char *stringValue)
set a string property in the property list
bool m_CameraActive
flag indicating if the camera is currently active or not. Caution: thread safe access only!
float * m_AmplitudeArray
float array holding the amplitude image
int m_RGBPixelNumber
number of pixels in the range image (m_RGBImageWidth*m_RGBImageHeight)
virtual bool IsCameraConnected()
returns true if the camera is connected
void SetFloatProperty(const char *propertyKey, float floatValue)
set a float property in the property list
std::mutex m_CameraActiveMutex
mutex for the cameraActive flag
virtual void StopCamera()
stops the continuous updating of the camera
float * m_IntensityArray
float array holding the intensity image
float * m_DistanceArray
float array holding the distance image
~ToFCameraDevice() override
int m_RGBImageHeight
height of the RGB image (y dimension)