Raytrix RayCam SDK  v2.1.0
IDevice.h
Go to the documentation of this file.
1 // Copyright (c) 2013 Raytrix GmbH. All rights reserved.
4 #pragma once
5 
6 #pragma managed(push, off)
7 
8 #include "ECallbackMode.h"
9 #include "EImageTransferMode.h"
10 #include "ECamProperty.h"
11 #include "ECamTriggerMode.h"
12 #include "EWhiteImageStatus.h"
13 #include "EImageFormat.h"
14 #include "ECompressionMode.h"
15 #include "ECamVideoMode.h"
16 #include "EOisMode.h"
17 #include "EBinningMode.h"
18 
19 #include "IImageProperty.h"
20 
21 #ifdef LINUX
22  #define __cdecl __attribute__((__cdecl__))
23 #endif
24 
25 namespace Rx
26 {
27  namespace RayCam
28  {
30  typedef void (__cdecl * TCallbackFunction)(void* callBackOwner, unsigned int iWidth, unsigned int iHeight,
31  unsigned int iPixelFormat,
32  unsigned int iDataFormat, void* pDataPtr);
33 
35  typedef void (__cdecl * TCallbackFunctionExtended)(void* callBackOwner, unsigned int iWidth, unsigned int iHeight,
36  unsigned int iPixelFormat,
37  unsigned int iDataFormat, void* pDataPtr, IImageProperty* pImageData);
38 
48  class IDevice
49  {
50  public:
51 
60  virtual void Open(void) = 0;
61 
67  virtual void Close(void) = 0;
68 
74  virtual void Reset(void) = 0;
75 
84  virtual void RegisterCallback(void* callBackOwner, TCallbackFunction pCallbackFunction) = 0;
85 
94  virtual void RegisterCallback(void* callBackOwner, TCallbackFunctionExtended pCallbackFunction) = 0;
95 
101  virtual void UnregisterCallback(void) = 0;
102 
108  virtual void UnregisterCallbackExtended(void) = 0;
109 
117  virtual void StartStream(Rx::RayCam::ECamTriggerMode::ID eMode) = 0;
118 
128 
134  virtual void StopStream(void) = 0;
135 
145  virtual void SuspendStream(bool bSuspend) = 0;
146 
153  virtual void Trigger(void) = 0;
154 
163  virtual void GetProperty(ECamProperty::ID eProp, int& theValue) = 0;
164 
173  virtual void GetProperty(ECamProperty::ID eProp, double& theValue) = 0;
174 
183  virtual void GetProperty(ECamProperty::ID eProp, long long& theValue) = 0;
184 
194  virtual void GetProperty(ECamProperty::ID eProp, int& theValue1, int& theValue2) = 0;
195 
205  virtual void GetProperty(ECamProperty::ID eProp, double& theValue1, double& theValue2) = 0;
206 
216  virtual void GetProperty(ECamProperty::ID eProp, long long& theValue1, long long& theValue2) = 0;
217 
227  virtual void GetProperty(ECamProperty::ID eProp, void* theValue, int& theSize) = 0;
228 
238  virtual void GetProperty(ECamProperty::ID eProp, char* theValue, int& theSize) = 0;
239 
249  virtual void GetProperty(ECamProperty::ID eProp, wchar_t* theValue, int& theSize) = 0;
250 
260  virtual void GetPropertyRange(ECamProperty::ID eProp, int& theMin, int& theMax) = 0;
261 
271  virtual void GetPropertyRange(ECamProperty::ID eProp, double& theMin, double& theMax) = 0;
272 
282  virtual void GetPropertyRange(ECamProperty::ID eProp, long long& theMin, long long& theMax) = 0;
283 
293  virtual bool HasProperty(ECamProperty::ID eProp) = 0;
294 
303  virtual void SetProperty(ECamProperty::ID eProp, int newValue) = 0;
304 
313  virtual void SetProperty(ECamProperty::ID eProp, double newValue) = 0;
314 
323  virtual void SetProperty(ECamProperty::ID eProp, long long newValue) = 0;
324 
334  virtual void SetProperty(ECamProperty::ID eProp, int newValue1, int newValue2) = 0;
335 
345  virtual void SetProperty(ECamProperty::ID eProp, double newValue1, double newValue2) = 0;
346 
356  virtual void SetProperty(ECamProperty::ID eProp, long long newValue1, long long newValue2) = 0;
357 
367  virtual void SetProperty(ECamProperty::ID eProp, void* theValue, int theSize) = 0;
368 
378  virtual void SetProperty(ECamProperty::ID eProp, char* theValue, int theSize) = 0;
379 
389  virtual void SetProperty(ECamProperty::ID eProp, wchar_t* theValue, int theSize) = 0;
390 
400  virtual void SetPropertyRange(ECamProperty::ID eProp, int newMin, int newMax) = 0;
401 
411  virtual void SetPropertyRange(ECamProperty::ID eProp, double newMin, double newMax) = 0;
412 
422  virtual void SetPropertyRange(ECamProperty::ID eProp, long long newMin, long long newMax) = 0;
423 
434  virtual void TestCameraConfiguration(double& dMinFps, double& dMaxFPS, double& dMinExposure, double& dMaxExposure) = 0;
435 
441  virtual void TestCameraConfiguration(void) = 0;
442 
448  virtual void ApplyCameraConfiguration(void) = 0;
449 
455  virtual void ProcessWhiteBalance(void) = 0;
456 
464  virtual EWhiteImageStatus::ID ProcessDevignetting(void) = 0;
465 
471  virtual void LockTextureAccess() = 0;
472 
478  virtual void UnlockTextureAccess() = 0;
479  };
480  }
481 }
482 
483 #pragma managed(pop)
virtual void Close(void)=0
Closes the camera and disconnects it.
virtual void ProcessWhiteBalance(void)=0
Take a white image and do color balancing.
virtual void TestCameraConfiguration(void)=0
This will test the test configuration.
virtual void Trigger(void)=0
Triggers this camera to deliver an image via the callback function Rx::RayCam::TCallbackFunction (onl...
This class represents a camera. To use the camera in streaming mode:
Definition: IDevice.h:48
virtual void UnregisterCallback(void)=0
Unregisters the receive image callback.
virtual EWhiteImageStatus::ID ProcessDevignetting(void)=0
Take a white image and do devignetting. This will remove vignetting artifacts.
virtual void StartStreamSuspended(Rx::RayCam::ECamTriggerMode::ID eMode)=0
Starts a video stream but suspended. You won't receive any images until you call Rx::RayCam::IDevice:...
virtual void SuspendStream(bool bSuspend)=0
Suspend or unsuspend the camera.
virtual void GetProperty(ECamProperty::ID eProp, int &theValue)=0
Gets a camera property of type int or bool (0 represents false).
virtual void UnregisterCallbackExtended(void)=0
Unregisters the extended receive image callback.
virtual void SetPropertyRange(ECamProperty::ID eProp, int newMin, int newMax)=0
Sets a camera property with two values of type int or bool (0 represents false).
ID
Definition: ECamProperty.h:21
ID
Definition: ECamTriggerMode.h:13
void(__cdecl * TCallbackFunction)(void *callBackOwner, unsigned int iWidth, unsigned int iHeight, unsigned int iPixelFormat, unsigned int iDataFormat, void *pDataPtr)
This is the callback functions which returns the captured images.
Definition: IDevice.h:30
virtual void ApplyCameraConfiguration(void)=0
This will apply the set up test configuration.
virtual void GetPropertyRange(ECamProperty::ID eProp, int &theMin, int &theMax)=0
Gets the min and max value of a camera property of type int.
virtual void Open(void)=0
Opens this camera device. Might throw a firmware mismatch exception which indicates that either the f...
void(__cdecl * TCallbackFunctionExtended)(void *callBackOwner, unsigned int iWidth, unsigned int iHeight, unsigned int iPixelFormat, unsigned int iDataFormat, void *pDataPtr, IImageProperty *pImageData)
This is the callback functions which returns the captured images.
Definition: IDevice.h:35
virtual void Reset(void)=0
Resets the camera.
virtual void StartStream(Rx::RayCam::ECamTriggerMode::ID eMode)=0
Starts a stream in a specific mode.
virtual void RegisterCallback(void *callBackOwner, TCallbackFunction pCallbackFunction)=0
Registers the receive image callback specified by Rx::RayCam::TCallbackFunction.
ID
Definition: EWhiteImageStatus.h:13
virtual void SetProperty(ECamProperty::ID eProp, int newValue)=0
Sets a camera property of type int or bool (0 represents false).
virtual void StopStream(void)=0
Stops a stream.
Definition: RayCamAPI.h:27
virtual void LockTextureAccess()=0
Locks all Texture operations when using OpenGl Texture Transfer
virtual void UnlockTextureAccess()=0
Unlocks the texture mutex when using OpenGL Texture Transfer
virtual bool HasProperty(ECamProperty::ID eProp)=0
Check if a property is available for Get/Set operations.