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 
135  virtual void StopStream(void) = 0;
136 
146  virtual void SuspendStream(bool bSuspend) = 0;
147 
154  virtual void Trigger(void) = 0;
155 
164  virtual void GetProperty(ECamProperty::ID eProp, int& theValue) = 0;
165 
174  virtual void GetProperty(ECamProperty::ID eProp, double& theValue) = 0;
175 
184  virtual void GetProperty(ECamProperty::ID eProp, long long& theValue) = 0;
185 
195  virtual void GetProperty(ECamProperty::ID eProp, int& theValue1, int& theValue2) = 0;
196 
206  virtual void GetProperty(ECamProperty::ID eProp, double& theValue1, double& theValue2) = 0;
207 
217  virtual void GetProperty(ECamProperty::ID eProp, long long& theValue1, long long& theValue2) = 0;
218 
228  virtual void GetProperty(ECamProperty::ID eProp, void* theValue, int& theSize) = 0;
229 
239  virtual void GetProperty(ECamProperty::ID eProp, char* theValue, int& theSize) = 0;
240 
250  virtual void GetProperty(ECamProperty::ID eProp, wchar_t* theValue, int& theSize) = 0;
251 
261  virtual void GetPropertyRange(ECamProperty::ID eProp, int& theMin, int& theMax) = 0;
262 
272  virtual void GetPropertyRange(ECamProperty::ID eProp, double& theMin, double& theMax) = 0;
273 
283  virtual void GetPropertyRange(ECamProperty::ID eProp, long long& theMin, long long& theMax) = 0;
284 
294  virtual bool HasProperty(ECamProperty::ID eProp) = 0;
295 
304  virtual void SetProperty(ECamProperty::ID eProp, int newValue) = 0;
305 
314  virtual void SetProperty(ECamProperty::ID eProp, double newValue) = 0;
315 
324  virtual void SetProperty(ECamProperty::ID eProp, long long newValue) = 0;
325 
335  virtual void SetProperty(ECamProperty::ID eProp, int newValue1, int newValue2) = 0;
336 
346  virtual void SetProperty(ECamProperty::ID eProp, double newValue1, double newValue2) = 0;
347 
357  virtual void SetProperty(ECamProperty::ID eProp, long long newValue1, long long newValue2) = 0;
358 
368  virtual void SetProperty(ECamProperty::ID eProp, void* theValue, int theSize) = 0;
369 
379  virtual void SetProperty(ECamProperty::ID eProp, char* theValue, int theSize) = 0;
380 
390  virtual void SetProperty(ECamProperty::ID eProp, wchar_t* theValue, int theSize) = 0;
391 
401  virtual void SetPropertyRange(ECamProperty::ID eProp, int newMin, int newMax) = 0;
402 
412  virtual void SetPropertyRange(ECamProperty::ID eProp, double newMin, double newMax) = 0;
413 
423  virtual void SetPropertyRange(ECamProperty::ID eProp, long long newMin, long long newMax) = 0;
424 
435  virtual void TestCameraConfiguration(double& dMinFps, double& dMaxFPS, double& dMinExposure, double& dMaxExposure) = 0;
436 
442  virtual void TestCameraConfiguration(void) = 0;
443 
449  virtual void ApplyCameraConfiguration(void) = 0;
450 
456  virtual void ProcessWhiteBalance(void) = 0;
457 
465  virtual EWhiteImageStatus::ID ProcessDevignetting(void) = 0;
466 
472  virtual void LockTextureAccess() = 0;
473 
479  virtual void UnlockTextureAccess() = 0;
480  };
481  }
482 }
483 
484 #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. The function abort pending image exposures.
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.