Medical Imaging Interaction Toolkit  2018.4.99-3e3f1a6e
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 {
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
Superclass of all classes generating Images (instances of class Image) as output. ...
float * m_DistanceArray
member holding the current distance array
int m_RGBImageWidth
Width of the captured RGB image.
int m_ImageSequence
counter for currently acquired images
int m_RGBPixelNumber
Number of pixels in the RGB image.
signed integer value
Definition: jsoncpp.h:348
int m_RGBImageHeight
Height of the captured RGB image.
#define MITKTOFHARDWARE_EXPORT
Virtual interface and base class for all Time-of-Flight devices.
Superclass of all classes generating some kind of mitk::BaseData.
DataCollection - Class to facilitate loading/accessing structured data.
int m_CaptureWidth
Width of the captured ToF image.
float * m_IntensityArray
member holding the current intensity array
char * m_SourceDataArray
member holding the current source data array
Abstract base class for properties.
ToFCameraDevice::Pointer m_ToFCameraDevice
Device allowing access to ToF image data.
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:40
Image source providing ToF images. Interface for filters provided in ToFProcessing module...
int m_SourceDataSize
size of the source data in bytes
Image source providing ToF images. Interface for filters provided in ToFProcessing module...
UTF-8 string value.
Definition: jsoncpp.h:351
unsigned long m_DeviceObserverTag
tag of the observer for the ToFCameraDevice
unsigned char * m_RgbDataArray
member holding the current rgb data array
int m_PixelNumber
Number of pixels in the image.
float * m_AmplitudeArray
member holding the current amplitude array
int m_CaptureHeight
Height of the captured ToF image.