Medical Imaging Interaction Toolkit
2023.04.00
Medical Imaging Interaction Toolkit
|
Go to the documentation of this file.
12 #ifndef mitkToFCameraDevice_h
13 #define mitkToFCameraDevice_h
15 #include <MitkToFHardwareExports.h>
21 #include "itkObject.h"
22 #include "itkObjectFactory.h"
47 virtual bool OnConnectCamera() = 0;
54 virtual bool ConnectCamera();
58 virtual bool DisconnectCamera() = 0;
63 virtual void StartCamera() = 0;
67 virtual void StopCamera();
71 virtual bool IsCameraActive();
75 virtual bool IsCameraConnected();
79 virtual void UpdateCamera() = 0;
86 virtual void GetAmplitudes(
float* amplitudeArray,
int& imageSequence) = 0;
92 virtual void GetIntensities(
float* intensityArray,
int& imageSequence) = 0;
98 virtual void GetDistances(
float* distanceArray,
int& imageSequence) = 0;
109 virtual void GetAllImages(
float* distanceArray,
float* amplitudeArray,
float* intensityArray,
char* sourceDataArray,
110 int requiredImageSequence,
int& capturedImageSequence,
unsigned char* rgbDataArray=
nullptr) = 0;
115 itkGetMacro(CaptureWidth,
int);
120 itkGetMacro(CaptureHeight,
int);
125 itkGetMacro(SourceDataSize,
int);
130 itkGetMacro(BufferSize,
int);
135 itkGetMacro(MaxBufferSize,
int);
140 void SetBoolProperty(
const char* propertyKey,
bool boolValue );
145 void SetIntProperty(
const char* propertyKey,
int intValue );
150 void SetFloatProperty(
const char* propertyKey,
float floatValue );
155 void SetStringProperty(
const char* propertyKey,
const char* stringValue );
160 virtual void SetProperty(
const char *propertyKey,
BaseProperty* propertyValue );
165 virtual BaseProperty* GetProperty(
const char *propertyKey );
170 bool GetBoolProperty(
const char *propertyKey,
bool& boolValue);
175 bool GetStringProperty(
const char *propertyKey, std::string&
string);
180 bool GetIntProperty(
const char *propertyKey,
int& integer);
182 virtual int GetRGBCaptureWidth();
184 virtual int GetRGBCaptureHeight();
195 virtual void AllocatePixelArrays();
199 virtual void CleanupPixelArrays();
int m_CurrentPos
current position in the buffer which will be retrieved by the Get methods
int m_SourceDataSize
size of the PMD source data
Abstract base class for properties.
bool m_CameraConnected
flag indicating if the camera is successfully connected or not. Caution: thread safe access only!
PropertyList::Pointer m_PropertyList
a list of the corresponding properties
#define mitkClassMacroItkParent(className, SuperClassName)
float * m_AmplitudeArray
float array holding the amplitude image
DataCollection - Class to facilitate loading/accessing structured data.
int m_RGBImageHeight
height of the RGB image (y dimension)
int m_BufferSize
buffer size of the image buffer needed for loss-less acquisition of range data
int m_FreePos
current position in the buffer which will be filled with data acquired from the hardware
bool m_CameraActive
flag indicating if the camera is currently active or not. Caution: thread safe access only!
int m_ImageSequence
counter for acquired images
int m_RGBPixelNumber
number of pixels in the range image (m_RGBImageWidth*m_RGBImageHeight)
int m_PixelNumber
number of pixels in the range image (m_CaptureWidth*m_CaptureHeight)
float * m_IntensityArray
float array holding the intensity image
int m_RGBImageWidth
width of the RGB image (x dimension)
float * m_DistanceArray
float array holding the distance image
int m_MaxBufferSize
maximal buffer size needed for initialization of data arrays. Default value is 100.
std::mutex m_ImageMutex
mutex for images provided by the range camera
Virtual interface and base class for all Time-of-Flight devices.
#define MITK_DECLARE_SERVICE_INTERFACE(IFace, IId)
std::mutex m_CameraActiveMutex
mutex for the cameraActive flag
int m_CaptureWidth
width of the range image (x dimension)
int m_CaptureHeight
height of the range image (y dimension)