Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 #ifndef __mitkToFImageGrabber_h
17 #define __mitkToFImageGrabber_h
18 
19 #include <MitkToFHardwareExports.h>
20 #include <mitkCommon.h>
21 #include <mitkToFImageSource.h>
22 #include <mitkToFCameraDevice.h>
23 
24 #include <itkObject.h>
25 #include <itkObjectFactory.h>
26 
27 namespace mitk
28 {
38  class MITKTOFHARDWARE_EXPORT ToFImageGrabber : public mitk::ToFImageSource
39  {
40  public:
41 
43 
44  itkFactorylessNewMacro(Self)
45  itkCloneMacro(Self)
46 
47  void ShowDebugImage(float* distances);
51  virtual bool ConnectCamera();
55  virtual bool DisconnectCamera();
60  virtual void StartCamera();
64  virtual void StopCamera();
68  virtual bool IsCameraActive();
72  virtual bool IsCameraConnected();
77  void SetCameraDevice(ToFCameraDevice* aToFCameraDevice);
82  ToFCameraDevice* GetCameraDevice();
88  int SetModulationFrequency(int modulationFrequency);
93  int GetModulationFrequency();
99  int SetIntegrationTime(int integrationTime);
104  int GetIntegrationTime();
109  int GetCaptureWidth();
114  int GetCaptureHeight();
119  int GetPixelNumber();
124  int GetRGBImageWidth();
129  int GetRGBImageHeight();
134  int GetRGBPixelNumber();
135 
136 // properties
137  void SetBoolProperty( const char* propertyKey, bool boolValue );
138 
139  void SetIntProperty( const char* propertyKey, int intValue );
140 
141  void SetFloatProperty( const char* propertyKey, float floatValue );
142 
143  void SetStringProperty( const char* propertyKey, const char* stringValue );
144 
145  void SetProperty( const char *propertyKey, BaseProperty* propertyValue );
146 
147  bool GetBoolProperty( const char* propertyKey);
148 
149  int GetIntProperty( const char* propertyKey);
150 
151  float GetFloatProperty( const char* propertyKey);
152 
153  const char* GetStringProperty( const char* propertyKey);
154 
155  BaseProperty* GetProperty( const char *propertyKey);
156 
157 
158  protected:
159 
163  void OnToFCameraDeviceModified();
164 
168  virtual void CleanUpImageArrays();
172  virtual void AllocateImageArrays();
173 
177  void InitializeImages();
178 
192  unsigned char* m_RgbDataArray;
193  unsigned long m_DeviceObserverTag;
194  ToFImageGrabber();
195 
196  ~ToFImageGrabber();
197 
205  void GenerateData() override;
206 
207  private:
208 
209  };
210 } //END mitk namespace
211 #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.
itk::SmartPointer< Self > Pointer
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.
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:44
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.