MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
mitkToFImageGrabber.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 mitkToFImageGrabber_h
13#define mitkToFImageGrabber_h
14
15#include <MitkToFHardwareExports.h>
16#include <mitkCommon.h>
17#include <mitkToFImageSource.h>
18#include <mitkToFCameraDevice.h>
19
20#include <itkObject.h>
21#include <itkObjectFactory.h>
22
23namespace mitk
24{
34 class MITKTOFHARDWARE_EXPORT ToFImageGrabber : public mitk::ToFImageSource
35 {
36 public:
37
39
41
43
44 void ShowDebugImage(float* distances);
48 virtual bool ConnectCamera();
52 virtual bool DisconnectCamera();
57 virtual void StartCamera();
61 virtual void StopCamera();
65 virtual bool IsCameraActive();
69 virtual bool IsCameraConnected();
74 void SetCameraDevice(ToFCameraDevice* aToFCameraDevice);
79 ToFCameraDevice* GetCameraDevice();
85 int SetModulationFrequency(int modulationFrequency);
90 int GetModulationFrequency();
96 int SetIntegrationTime(int integrationTime);
101 int GetIntegrationTime();
106 int GetCaptureWidth();
111 int GetCaptureHeight();
116 int GetPixelNumber();
121 int GetRGBImageWidth();
126 int GetRGBImageHeight();
131 int GetRGBPixelNumber();
132
133// properties
134 void SetBoolProperty( const char* propertyKey, bool boolValue );
135
136 void SetIntProperty( const char* propertyKey, int intValue );
137
138 void SetFloatProperty( const char* propertyKey, float floatValue );
139
140 void SetStringProperty( const char* propertyKey, const char* stringValue );
141
142 void SetProperty( const char *propertyKey, BaseProperty* propertyValue );
143
144 bool GetBoolProperty( const char* propertyKey);
145
146 int GetIntProperty( const char* propertyKey);
147
148 float GetFloatProperty( const char* propertyKey);
149
150 const char* GetStringProperty( const char* propertyKey);
151
152 BaseProperty* GetProperty( const char *propertyKey);
153
154
155 protected:
156
160 void OnToFCameraDeviceModified();
161
165 virtual void CleanUpImageArrays();
169 virtual void AllocateImageArrays();
170
174 void InitializeImages();
175
176 ToFCameraDevice::Pointer m_ToFCameraDevice;
189 unsigned char* m_RgbDataArray;
190 unsigned long m_DeviceObserverTag;
192
193 ~ToFImageGrabber() override;
194
202 void GenerateData() override;
203
204 private:
205
206 };
207} //END mitk namespace
208#endif
Virtual interface and base class for all Time-of-Flight devices.
Image source providing ToF images. Interface for filters provided in ToFProcessing module.
float * m_AmplitudeArray
member holding the current amplitude array
unsigned char * m_RgbDataArray
member holding the current rgb data array
int m_ImageSequence
counter for currently acquired images
mitkClassMacro(ToFImageGrabber, ImageSource)
int m_RGBPixelNumber
Number of pixels in the RGB image.
int m_SourceDataSize
size of the source data in bytes
unsigned long m_DeviceObserverTag
tag of the observer for the ToFCameraDevice
void ShowDebugImage(float *distances)
float * m_DistanceArray
member holding the current distance array
float * m_IntensityArray
member holding the current intensity array
int m_CaptureHeight
Height of the captured ToF image.
int m_CaptureWidth
Width of the captured ToF image.
int m_RGBImageHeight
Height of the captured RGB image.
ToFCameraDevice::Pointer m_ToFCameraDevice
Device allowing access to ToF image data.
int m_RGBImageWidth
Width of the captured RGB image.
char * m_SourceDataArray
member holding the current source data array
int m_PixelNumber
Number of pixels in the image.
Image source providing ToF images. Interface for filters provided in ToFProcessing module.
IGT Exceptions.