Medical Imaging Interaction Toolkit  2023.12.00
Medical Imaging Interaction Toolkit
mitkToFImageGrabber.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found 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 
23 namespace mitk
24 {
34  class MITKTOFHARDWARE_EXPORT ToFImageGrabber : public mitk::ToFImageSource
35  {
36  public:
37 
39 
40  itkFactorylessNewMacro(Self);
41 
42  itkCloneMacro(Self);
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;
191  ToFImageGrabber();
192 
193  ~ToFImageGrabber() override;
194 
202  void GenerateData() override;
203 
204  private:
205 
206  };
207 } //END mitk namespace
208 #endif
mitk::ToFImageGrabber::m_AmplitudeArray
float * m_AmplitudeArray
member holding the current amplitude array
Definition: mitkToFImageGrabber.h:187
mitk::BaseProperty
Abstract base class for properties.
Definition: mitkBaseProperty.h:36
mitk::ImageSource
Superclass of all classes generating Images (instances of class Image) as output.
Definition: mitkImageSource.h:36
mitk::ToFImageGrabber::m_IntensityArray
float * m_IntensityArray
member holding the current intensity array
Definition: mitkToFImageGrabber.h:185
mitk::ToFImageGrabber
Image source providing ToF images. Interface for filters provided in ToFProcessing module.
Definition: mitkToFImageGrabber.h:34
mitk::ToFImageGrabber::m_RGBImageHeight
int m_RGBImageHeight
Height of the captured RGB image.
Definition: mitkToFImageGrabber.h:181
mitk::ToFImageGrabber::m_DistanceArray
float * m_DistanceArray
member holding the current distance array
Definition: mitkToFImageGrabber.h:186
mitk::ToFImageGrabber::m_ToFCameraDevice
ToFCameraDevice::Pointer m_ToFCameraDevice
Device allowing access to ToF image data.
Definition: mitkToFImageGrabber.h:176
mitkToFImageSource.h
mitk::ToFImageSource
Image source providing ToF images. Interface for filters provided in ToFProcessing module.
Definition: mitkToFImageSource.h:35
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::ToFImageGrabber::m_SourceDataArray
char * m_SourceDataArray
member holding the current source data array
Definition: mitkToFImageGrabber.h:188
mitk::BaseDataSource
Superclass of all classes generating some kind of mitk::BaseData.
Definition: mitkBaseDataSource.h:71
mitk::ToFImageGrabber::m_SourceDataSize
int m_SourceDataSize
size of the source data in bytes
Definition: mitkToFImageGrabber.h:184
mitk::ToFImageGrabber::m_RGBPixelNumber
int m_RGBPixelNumber
Number of pixels in the RGB image.
Definition: mitkToFImageGrabber.h:182
mitk::ToFImageGrabber::m_CaptureWidth
int m_CaptureWidth
Width of the captured ToF image.
Definition: mitkToFImageGrabber.h:177
mitk::ToFImageGrabber::m_DeviceObserverTag
unsigned long m_DeviceObserverTag
tag of the observer for the ToFCameraDevice
Definition: mitkToFImageGrabber.h:190
mitk::ToFImageGrabber::m_RgbDataArray
unsigned char * m_RgbDataArray
member holding the current rgb data array
Definition: mitkToFImageGrabber.h:189
mitk::ToFImageGrabber::m_CaptureHeight
int m_CaptureHeight
Height of the captured ToF image.
Definition: mitkToFImageGrabber.h:178
mitkCommon.h
mitk::ToFImageGrabber::m_ImageSequence
int m_ImageSequence
counter for currently acquired images
Definition: mitkToFImageGrabber.h:183
mitkClassMacro
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:36
mitk::ToFImageGrabber::m_PixelNumber
int m_PixelNumber
Number of pixels in the image.
Definition: mitkToFImageGrabber.h:179
mitk::ToFImageGrabber::m_RGBImageWidth
int m_RGBImageWidth
Width of the captured RGB image.
Definition: mitkToFImageGrabber.h:180
mitk::ToFCameraDevice
Virtual interface and base class for all Time-of-Flight devices.
Definition: mitkToFCameraDevice.h:37
mitkToFCameraDevice.h