/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2017 Raytrix GmbH. All rights reserved.
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#pragma once

#include "DLLInterface.h"

#include "Rx.Interop.Runtime30/CameraProperties.h"

#include "Rx.LF/ESpace.h"
#include "Rx.Core.Dongle/RxDongle.Features.h"

#include "Rx.Core/RxCalibMetaData.h"

#include "Rx.Core.Ex/RxArrayString.h"
#include "Rx.Core.Ex/RxArrayUInt.h"
#include "Rx.Core.Ex/RxArrayDouble.h"
#include "Rx.Core.Ex/RxMetaData.h"
#include "Rx.Core.Ex/EValueType.h"

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// namespace: Rx.LFR
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
namespace Rx
{
	namespace LFR
	{
		class CApiLF_Impl;

		/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
		/// <summary>
		/// 	ApiLF.
		/// </summary>
		/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
		class RX_API CApiLF
		{
		public:

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Initialize the Raytrix API.
			/// </summary>
			///
			/// <pre>
			/// 	Before any light field images can be loaded, recorded or processed a CUDA device has to be chosen using the function
			/// 	Rx::LFR::CApiLF::RxCudaSelectDevice.To access Raytrix cameras you first have to call Rx::LFR::CApiLF::RxCamDriverInit and
			/// 	Rx::LFR::CApiLF::RxCamRegister.
			/// </pre>
			///
			/// <attention> After executing Rx::LFR::CApiLF::RxInit neither a CUDA device is selected nor a camera device initialized. </attention>
			///
			/// <param name="bUseCUDA">    (Optional) If set to false only functionality that does not rely on CUDA can be used. </param>
			/// <param name="sxLibPath">   (Optional) The absolute path to the camera driver DLLs (Rx.CameraNet.Type*.dll). </param>
			/// <param name="sxCalibPath"> (Optional) The absolute path to the camera calibration directories. </param>
			/// <param name="pvData">	   [in,out] (Optional) Reserved. Must be zero. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxInit(bool bUseCUDA = true, const Rx::CRxString& sxLibPath = "", const Rx::CRxString& sxCalibPath = "", void* pvData = 0);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Close any open cameras and free all memory allocated on CUDA device and in host memory.
			/// </summary>
			///
			/// <warning>
			/// 	Make sure to call this function before ending your program. Otherwise the CUDA device memory will fill up with repeated
			/// 	execution of the software.
			/// </warning>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxFinalize();

		public:

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Gets the interface defined by the given interface ID.
			/// </summary>
			///
			/// <param name="eInterface"> The interface ID. </param>
			///
			/// <returns> Null if it fails, else the interface. </returns>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void* GetInterface(Interfaces::EApiLF::ID eInterface);

		public:

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Registers a status message callback Function. This function will be called when a new Status Message is fired.
			/// </summary>
			///
			/// <param name="pFunc">	 The callback function. </param>
			/// <param name="pvContext"> [in] A Context Pointer which is forwarded to the callback function call. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxAddStatusMessageHandler(Rx::LFR::TFuncStatusMsg pFunc, void* pvContext);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Removes a registered message callback function.
			/// </summary>
			///
			/// <param name="pFunc">	 The function. </param>
			/// <param name="pvContext"> [in] If non-null, the context. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxRemoveStatusMessageHandler(Rx::LFR::TFuncStatusMsg pFunc, void* pvContext);

		public:

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Gets the release date of this version of the Raytrix Light Field Runtime. Can be called without initializing the API.
			/// </summary>
			///
			/// <param name="iDay">   [out] The release day. </param>
			/// <param name="iMonth"> [out] The release month. </param>
			/// <param name="iYear">  [out] The release year. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxGetReleaseDate(int& iDay, int& iMonth, int& iYear);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Sets details about the application that uses this runtime currently. Saving a ray file will write this details into the
			/// 	meta data of the file.
			/// </summary>
			///
			/// <param name="sxAppName">    The application name. </param>
			/// <param name="sxAppVersion"> The application version. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxSetApplicationDetails(const Rx::CRxString& sxAppName, const Rx::CRxString& sxAppVersion);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Test whether the Dongle offers the given features.
			/// </summary>
			///
			/// <attention>
			/// 	Not all functions of this API are necessarily available. This depends on the currently active license, which is defined
			/// 	by the Raytrix dongle attached to the system. To check whether a set of features is available you can OR the
			/// 	corresponding feature IDs. The feature IDs are available through defines all starting with
			/// 	Rx::Dongle::ERuntimeFeature::ID. For example, to test for the features multiview and 3D evaluation call:
			/// 	if(Rx::LFR::Net::ApiLF::RxHasFeature(Rx::Dongle::ERuntimeFeature::SDK | Rx::Dongle::ERuntimeFeature::RxLive)){...}
			/// </attention>
			///
			/// <param name="uFeatureIDs"> A OR-ed list of Rx::Dongle::ERuntimeFeature::ID to check for availability. </param>
			///
			/// <returns> true if the feature is available, false otherwise. </returns>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static bool RxHasFeature(unsigned uFeatureIDs);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Test whether the Dongle offers a given feature.
			/// </summary>
			///
			/// <attention>
			/// 	Not all functions of this API are necessarily available. This depends on the currently active license, which is defined
			/// 	by the Raytrix dongle attached to the system.
			/// </attention>
			///
			/// <param name="eFeatureID"> The feature to check for availability. </param>
			///
			/// <returns> true if the feature is available, false otherwise. </returns>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static bool RxHasFeature(Rx::Dongle::ERuntimeFeature::ID eFeatureID);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Get the IDs of an attached dongle.
			/// </summary>
			///
			/// <param name="iDngID"> [in] On return contains the hardware dongle ID. </param>
			/// <param name="iRxID">  [in] On return contains the Raytrix dongle ID. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxDongleGetID(int& iDngID, int& iRxID);

		public:

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Returns the number of CUDA devices installed.
			/// </summary>
			///
			/// <returns> The number of CUDA devices. </returns>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static int RxCudaDeviceCount();

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Get the name and the compute capability major and minor version for a CUDA device.
			/// </summary>
			///
			/// <param name="iDevice">  Zero-based ID of the CUDA device. </param>
			/// <param name="sxName">   [out] On return contains the name of the CUDA device. </param>
			/// <param name="iCCMajor"> [out] On return contains the major version of the CUDA device compute capability. </param>
			/// <param name="iCCMinor"> [out] On return contains the minor version of the CUDA device compute capability. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxCudaDeviceProp(int iDevice, Rx::CRxString& sxName, unsigned& iCCMajor, unsigned& iCCMinor);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Select a CUDA device.
			/// </summary>
			///
			/// <attention>
			/// 	This function must be called once and only once per process. The selected CUDA device cannot be changed during runtime.
			///
			/// 	Use the functions Rx::LFR::CApiLF::RxCudaDeviceCount and Rx::LFR::CApiLF::RxCudaDeviceProp to obtain information about the
			/// 	installed CUDA devices and then select the most appropriate CUDA device with this function. If iDevice is set to -1,
			/// 	the first appropriate CUDA device is selected.
			///
			/// 	To exchange image data generated by CUDA directly with an OpenGL rendering context on the same device, bUseGL has to be
			/// 	set to true and the CUDA device has to support OpenGL 3.0 or higher. Note that CUDA/DirectX interop. is currently not
			/// 	supported.
			///
			/// 	For further details on CUDA/OpenGL interop.
			/// </attention>
			///
			/// <param name="iDevice"> (Optional) The zero-based CUDA device ID or -1 for automatic selection. </param>
			/// <param name="bUseGL">  (Optional) Flag indicating whether to initialize CUDA for OpenGL interop. or not. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxCudaSelectDevice(int iDevice = -1, bool bUseGL = false);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Return free and total amount of memory on the selected CUDA device.
			/// </summary>
			///
			/// <param name="nFreeMem">  [out] On return contains the amount of free memory in bytes. </param>
			/// <param name="nTotalMem"> [out] On return contains the amount of total memory in bytes. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxCudaDeviceMemInfo(size_t& nFreeMem, size_t& nTotalMem);

		public:

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Register available cameras.
			///
			/// 	This functions registers all cameras that are currently available. Only registered cameras can be used by the Raytrix
			/// 	API. This function can be called repeatedly to update the list of available cameras. This function has to be called
			/// 	after Rx::LFR::CApiLF::RxCamDriverInit and before any other API camera functions.
			/// </summary>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxCamRegister();

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Opens the given camera. Camera settings can only be accessed after a camera has been opened. The first call to open
			/// 	initializes the camera too.
			/// </summary>
			///
			/// <warning> If initialization fails, an Rx::CRxException is thrown that holds the reason of failure. </warning>
			///
			/// <param name="uCamIdx"> The zero-based index of the camera to open. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxCamOpen(unsigned uCamIdx);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Closes the given camera. If the given camera is currently bound, the camera is unbound before closing. Also, if the
			/// 	camera is in capture mode, the capturing is stopped before unbinding.
			/// </summary>
			///
			/// <param name="uCamIdx"> The zero-based index of the camera to close. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxCamClose(unsigned uCamIdx);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Binds the given camera to the returned API image ID. Call RxCamUnBind to unbind the bound camera. Only one camera can
			/// 	be bound. Calling Rx::LFR::CApiLF::RxCamBind with another camera index results in an Rx::CRxException.
			/// </summary>
			///
			/// <attention>
			/// 	The internal ray image with ID returned by this function is not deleted from memory when camera is unbound. It has to
			/// 	be deleted explicitly using Rx::LFR::CApiLF::RxRayDelete when it is no longer needed.
			/// </attention>
			///
			/// <param name="uCamIdx"> Zero-based index of the camera. </param>
			///
			/// <returns> The ray image handle of the image into which camera images are captured. </returns>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static unsigned RxCamBind(unsigned uCamIdx);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Unbinds a currently bound camera. If the bound camera is still capturing images, the capturing is stopped and then the
			/// 	camera is unbound.
			/// </summary>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxCamUnbind();

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Prepares the currently bound camera for capturing images. If the currently bound camera is already in capture mode,
			/// 	then the function throws an exception.
			/// </summary>
			///
			/// <attention>
			/// 	Calling this function does not actually capture any images but prepares the camera for capturing images.The
			/// 		function also reads the calibration data of the currently bound camera from the path set as sxCalibPath in
			/// 		Rx::LFR::CApiLF::RxInit.
			/// </attention>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxCamStartCapture();

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Stops capturing of the currently bound camera. If the camera is not in capture mode, the function simply returns
			/// 	without error.
			/// </summary>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxCamStopCapture();

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Suspend capturing images.
			///
			/// 	This function stops the data transfer between camera and computer but keeps all other capture settings.
			/// </summary>
			///
			/// <param name="bSuspend"> True to suspend camera capture and false to restart camera capture. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxCamSuspendCapture(bool bSuspend);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Triggers capturing of a single image of the currently bound camera. The image can be retrieved by calling
			/// 	Rx::LFR::CApiLF::RxCamRetrieveImage.
			/// </summary>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxCamTrigger();

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Retrieve a single image from the currently bound camera.
			/// </summary>
			///
			/// <attention>
			/// 	This function only returns after an image has been retrieved by the camera and is available on the CUDA device. The
			/// 	camera image is retrieved into the image referenced by the ray image handle returned by the function
			/// 	Rx::LFR::CApiLF::RxCamBind. It is also automatically copied onto the CUDA device, so that all processing of the light field
			/// 	image can be done purely on the CUDA device without repeated copying of the light-field image from host to device
			/// 	memory.
			/// </attention>
			///
			/// <returns> true if an image was available, false otherwise. </returns>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static bool RxCamRetrieveImage();

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Register a callback function which is called when a new image is available.
			/// </summary>
			///
			/// <param name="pFunc">	 The callback function pointer. </param>
			/// <param name="pvContext"> [in,out] The void pointer of the Context. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxCamRegisterImageCallback(Rx::LFR::TFuncImageCaptured pFunc, void* pvContext);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Remove the image callback function.
			/// </summary>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxCamRemoveImageCallback();

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Creates a new calibration database for bound camera.
			///
			/// 	If a calibration database for this camera already exists, a new one will only be created if bForce is true Otherwise a
			/// 	Rx::CRxException is thrown.
			/// </summary>
			///
			/// <param name="bForce"> Flags whether to overwrite an existing database or not. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxCalibDBCreateDataBaseForBoundCamera(bool bForce);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Creates a new calibration database for camera with ID uCamIdx
			///
			/// 	If a calibration database for this camera already exists, a new one will only be created if bForce is true.
			/// 	Otherwise a Rx::CRxException is thrown.
			/// </summary>
			///
			/// <param name="uCamIdx"> Zero-based index of the camera. </param>
			/// <param name="bForce">  Flags whether to overwrite an existing database or not. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxCalibDBCreateDataBaseForCamera(unsigned uCamIdx, bool bForce);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Creates a new calibration database for camera with name sxCamHardwareId.
			/// </summary>
			///
			/// <warning>
			/// 	If a calibration database for this camera already exists, a new one will only be created if bForce is true Otherwise a
			/// 	Rx::CRxException is thrown.
			/// </warning>
			///
			/// <param name="sxCamHardwareId"> Type of the camera. </param>
			/// <param name="bForce">		   Flags whether to overwrite an existing database or not. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxCalibDBCreateDataBase(const Rx::CRxString& sxCamHardwareId, bool bForce);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Creates a new calibration and returns the GUID of the newly created calibration in sxNewGUID.
			/// </summary>
			///
			/// <param name="sxNewGUID">	   [in] Unique identifier for the new calibration. </param>
			/// <param name="sxCamHardwareId"> Hardware id of the camera. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxCalibDBNewCalib(Rx::CRxString& sxNewGUID, const Rx::CRxString& sxCamHardwareId);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Creates a new calibration and returns the GUID of the newly created calibration in sxNewGUID.
			/// </summary>
			///
			/// <param name="sxNewGUID"> [in] Unique identifier for the new calibration. </param>
			/// <param name="uCamIdx">   [in] id of a camera. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxCalibDBCameraNewCalib(Rx::CRxString& sxNewGUID, unsigned uCamIdx);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Creates a new calibration and returns the GUID of the newly created calibration in sxNewGUID.
			/// </summary>
			///
			/// <param name="sxNewGUID"> [in] Unique identifier for the new calibration. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxCalibDBBoundCameraNewCalib(Rx::CRxString& sxNewGUID);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Deletes camera calibration with GUID sxGUID
			/// </summary>
			///
			/// <warning> If there is no calibration database for given parameters, an Rx::CRxException is thrown. </warning>
			///
			/// <param name="sxGUID"> The GUID of the calibration to delete. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxCalibDBDeleteCalib(const Rx::CRxString& sxGUID);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Applies the camera calibration defined by GUID sxGUID to the currently bound image in API. Also updates the
			/// 	computational class.
			/// </summary>
			///
			/// <param name="sxGUID">		   GUID of the calibration which should be applied to bound image. </param>
			/// <param name="bApplyGrayImage"> If true, the current gray image is replaced by the one from the given calibration. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxCalibDBBindCalib(const Rx::CRxString& sxGUID, bool bApplyGrayImage);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Applies the currently bound camera calibration to the current bound image in API. Also updates to the computational
			/// 	class.
			/// </summary>
			///
			/// <pre> There must be a bound image before calling this function. </pre>
			///
			/// <param name="bApplyGrayImage"> If true, the current gray image is replaced by the one from the given calibration. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxCalibDBReloadBoundCalib(bool bApplyGrayImage);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Gets (The camera calibration) from current bound image and saves it to the calibration defined by GUID sxGUID Also
			/// 	saves database to disk.
			/// </summary>
			///
			/// <pre> There must be a bound image before calling this function. </pre>
			///
			/// <param name="sxGUID"> GUID of the calibration which should be saved. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxCalibDBUpdateAndSaveCalib(const Rx::CRxString& sxGUID);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Gets calibration (The camera calibration) from current bound image and saves it to current calibration. Also saves
			/// 	database to disk.
			/// </summary>
			///
			/// <pre> There must be a bound image before calling this function. </pre>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxCalibDBUpdateAndSaveBoundCalib();

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Gets a  Rx::CRxArrayString which contains GUIDs of all calibration on this computer.
			/// </summary>
			///
			/// <param name="asxGUIDs"> [out] Rx::CRxArrayString of GUIDS. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxCalibDBGetCompleteCalibGuidList(Rx::CRxArrayString& asxGUIDs);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Gets a Rx::CRxArrayString which contains unique IDs of all calibration for camera with given index uCamIdx.
			/// </summary>
			///
			/// <param name="asxGUIDs"> [out] Rx::CRxArrayString of GUIDs. </param>
			/// <param name="uCamIdx">  Zero-based index of the camera. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxCalibDBGetCameraCalibGuidList(Rx::CRxArrayString& asxGUIDs, unsigned uCamIdx);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Gets a Rx::CRxArrayString which contains GUIDs of all master calibration on this computer.
			/// </summary>
			///
			/// <param name="asxGUIDs"> [out] Rx::CRxArrayString of GUIDS. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxCalibDBGetCompleteMasterCalibGuidList(Rx::CRxArrayString& asxGUIDs);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Gets a Rx::CRxString which contains the GUID of the master calibration of this camera.
			/// </summary>
			///
			/// <param name="sxGUID">  [out] Rx::CRxString of GUID. </param>
			/// <param name="uCamIdx"> Zero-based index of the camera. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxCalibDBGetCameraMasterCalibGuid(Rx::CRxString& sxGUID, unsigned uCamIdx);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Gets Rx::CRxCalibMetaData for calibration with given GUID sxGUID.
			/// </summary>
			///
			/// <param name="xCalibData"> [out] The calibration data. </param>
			/// <param name="sxGUID">	  The GUID of the calibration. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxCalibDBLoadCalibMetaData(Rx::CRxCalibMetaData& xCalibData, const Rx::CRxString& sxGUID);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Gets the last applied calibration data.
			/// </summary>
			///
			/// <param name="xCalibData"> [out] Information describing the calibration. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxCalibDBLoadBoundCalibMetaData(Rx::CRxCalibMetaData& xCalibData);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Sets Rx::CRxCalibMetaData for calibration with given GUID sxGUID.
			///
			/// 	Only certain parameters will be considered. The GUID, camera serial and camera type cannot be set.
			/// </summary>
			///
			/// <param name="xCalibData"> The calibration data. </param>
			/// <param name="sxGUID">	  The GUID of the calibration. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxCalibDBSaveCalibMetaData(const Rx::CRxCalibMetaData& xCalibData, const Rx::CRxString& sxGUID);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Sets calibration data to the last applied calibration.
			/// </summary>
			///
			/// <param name="xCalibData"> Information describing the calibration. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxCalibDBSaveBoundCalibMetaData(const Rx::CRxCalibMetaData& xCalibData);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Bind gray image of calibration to API and use this image as gray image too. Now you can calibrate a calibration without
			/// 	using a camera.
			///
			/// 	This function returns the image ID of the bound gray image in uRayHandle.
			/// </summary>
			///
			/// <warning> After using this image, you have to delete it to free the memory by calling Rx::LFR::CApiLF::RxRayDelete. </warning>
			///
			/// <param name="uRayHandle"> [out] Image ID of the bound gray image. </param>
			/// <param name="sxGUID">	  The GUID of the calibration. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxCalibDBBindCalibGrayImage(unsigned& uRayHandle, const Rx::CRxString& sxGUID);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Assign the gray image of the calibration with the given GUID to the bound calibration. This copies the gray image.
			/// </summary>
			///
			/// <param name="sxGUID">	   The unique identifier of the calibration with the gray image to copy. </param>
			/// <param name="bLoadGrayImg"> true to load gray image. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxCalibDBAssignGrayImageToBoundCalib(const Rx::CRxString& sxGUID, bool bLoadGrayImg);

		public:

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Test whether a camera parameter is supported by the given camera.
			/// </summary>
			///
			/// <attention>
			/// 	All camera and camera calibration parameters can be tested with this function. Use this function to test whether
			/// 	certain parameters are available or not. For example, the parameters: Rx::Interop::Runtime30::Camera::EProperty::Focus, Rx::Interop::Runtime30::Camera::EProperty::Iris,
			/// 	Rx::Interop::Runtime30::Camera::EProperty::Func_CalibMainLens are only available if a camera is attached that allows the direct control of the
			/// 	main lens.
			/// </attention>
			///
			/// <param name="ePar">    The camera parameter ID. </param>
			/// <param name="uCamIdx"> The camera index. </param>
			///
			/// <returns> True if the parameter is supported, otherwise false. </returns>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static bool RxCamIsParameterSupported(Rx::Interop::Runtime30::Camera::EProperty::ID ePar, unsigned uCamIdx);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Test whether a camera parameter is supported by the currently bound camera.
			/// </summary>
			///
			/// <attention>
			/// 	All camera and camera calibration parameters can be tested with this function. Use this function to test whether
			/// 	certain parameters are available or not. For example, the parameters: Rx::Interop::Runtime30::Camera::EProperty::Focus, Rx::Interop::Runtime30::Camera::EProperty::Iris,
			/// 	Rx::Interop::Runtime30::Camera::EProperty::Func_CalibMainLens are only available if a camera is attached that allows the direct control of the
			/// 	main lens.
			/// </attention>
			///
			/// <param name="ePar"> The camera parameter. </param>
			///
			/// <returns> True if the parameter is supported, otherwise false. </returns>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static bool RxCamIsParameterSupported(Rx::Interop::Runtime30::Camera::EProperty::ID ePar);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Get a camera parameter of type Rx::CRxString.
			/// </summary>
			///
			/// <warning> Not all parameters may be supported by all Raytrix cameras. </warning>
			///
			/// <attention>
			/// 	If the parameter referenced by ePar does not relate to a string parameter a Rx::CRxException is thrown.
			/// </attention>
			///
			/// <param name="uCamIdx"> The zero-based camera index. </param>
			/// <param name="ePar">    The camera parameter. Allowed parameters from Rx::Interop::Runtime30::Camera::EProperty are:
			/// 					   		- Rx::Interop::Runtime30::Camera::EProperty::DriverName
			/// 					   		- Rx::Interop::Runtime30::Camera::EProperty::RaytrixModelName
			/// 					   		- Rx::Interop::Runtime30::Camera::EProperty::InternalModelName
			/// 					   		- Rx::Interop::Runtime30::Camera::EProperty::HardwareId
			/// 					   		- Rx::Interop::Runtime30::Camera::EProperty::Serial
			/// 					   		- Rx::Interop::Runtime30::Camera::EProperty::TapBalanceMode
			/// 					   		- Rx::Interop::Runtime30::Camera::EProperty::SourceImageFolder. </param>
			/// <param name="sxValue"> [out] The returned string value. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxCamGetPar(unsigned uCamIdx, Rx::Interop::Runtime30::Camera::EProperty::ID ePar, Rx::CRxString& sxValue);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Get a camera parameter of type unsigned integer.
			/// </summary>
			///
			/// <warning> Not all parameters may be supported by all Raytrix cameras. </warning>
			///
			/// <attention>
			/// 	If the parameter referenced by ePar does not relate to an unsigned integer parameter an Rx::CRxException is
			/// 	thrown.
			/// </attention>
			///
			/// <param name="uCamIdx"> The zero-based camera index. </param>
			/// <param name="ePar">    The camera parameter ID. Allowed parameters from Rx::Interop::Runtime30::Camera::EProperty are:
			/// 					   - Camera
			/// 					    - Rx::Interop::Runtime30::Camera::EProperty::IsColor
			/// 					    - Rx::Interop::Runtime30::Camera::EProperty::IsBayer
			/// 					    - Rx::Interop::Runtime30::Camera::EProperty::Width
			/// 					    - Rx::Interop::Runtime30::Camera::EProperty::Height
			/// 					    - Rx::Interop::Runtime30::Camera::EProperty::OffsetX
			/// 					    - Rx::Interop::Runtime30::Camera::EProperty::OffsetY
			/// 					    - Rx::Interop::Runtime30::Camera::EProperty::Func_CalibMainLens
			/// 					    - Rx::Interop::Runtime30::Camera::EProperty::PIVMode
			/// 					    - Rx::Interop::Runtime30::Camera::EProperty::IsOpen
			/// 					    - Rx::Interop::Runtime30::Camera::EProperty::IsCapturing
			/// 					    - Rx::Interop::Runtime30::Camera::EProperty::TriggerMode
			/// 					    - Rx::Interop::Runtime30::Camera::EProperty::ExternalTriggerMode
			/// 					    - Rx::Interop::Runtime30::Camera::EProperty::HasIPConfig
			/// 					    - Rx::Interop::Runtime30::Camera::EProperty::GlobalStart
			/// 					    - Rx::Interop::Runtime30::Camera::EProperty::StrobeOn </param>
			/// <param name="uValue">  [out] The returned unsigned integer value. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxCamGetPar(unsigned uCamIdx, Rx::Interop::Runtime30::Camera::EProperty::ID ePar, unsigned& uValue);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Get camera parameter of type <c>double</c>
			/// </summary>
			///
			/// <warning> Not all parameters may be supported by all Raytrix cameras. </warning>
			///
			/// <attention>
			/// 	If the parameter referenced by ePar does not relate to an double parameter an Rx::CRxException is thrown.
			/// </attention>
			///
			/// <param name="uCamIdx"> The zero-based camera index. </param>
			/// <param name="ePar">    The camera parameter. Allowed parameters from Rx::Interop::Runtime30::Camera::EProperty are:
			/// 					   - Camera
			/// 					    - Rx::Interop::Runtime30::Camera::EProperty::Exposure
			/// 					    - Rx::Interop::Runtime30::Camera::EProperty::TapBalance
			/// 					    - Rx::Interop::Runtime30::Camera::EProperty::Gain
			/// 					    - Rx::Interop::Runtime30::Camera::EProperty::GainRed
			/// 					    - Rx::Interop::Runtime30::Camera::EProperty::GainGreen
			/// 					    - Rx::Interop::Runtime30::Camera::EProperty::GainBlue
			/// 					    - Rx::Interop::Runtime30::Camera::EProperty::FramesPerSecond
			/// 					    - Rx::Interop::Runtime30::Camera::EProperty::ActualFramesPerSecond
			/// 					    - Rx::Interop::Runtime30::Camera::EProperty::Focus
			/// 					    - Rx::Interop::Runtime30::Camera::EProperty::Iris
			/// 					    - Rx::Interop::Runtime30::Camera::EProperty::Temperature
			/// 					    - Rx::Interop::Runtime30::Camera::EProperty::StrobeLength1
			/// 					    - Rx::Interop::Runtime30::Camera::EProperty::StrobeLength2
			/// 					    - Rx::Interop::Runtime30::Camera::EProperty::StrobeDelay1
			/// 					    - Rx::Interop::Runtime30::Camera::EProperty::StrobeDelay2  </param>
			/// <param name="dValue">  [out] The returned double value. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxCamGetPar(unsigned uCamIdx, Rx::Interop::Runtime30::Camera::EProperty::ID ePar, double& dValue);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Get camera parameter of type Rx::CRxArrayString.
			/// </summary>
			///
			/// <warning> Not all parameters may be supported by all Raytrix cameras. </warning>
			///
			/// <attention>
			/// 	If the parameter referenced by ePar does not relate to a string-array parameter an Rx::CRxException is thrown.
			/// </attention>
			///
			/// <param name="uCamIdx"> The zero-based camera index. </param>
			/// <param name="ePar">    The camera parameter. </param>
			/// <param name="aValue">  [out] The returned value. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxCamGetPar(unsigned uCamIdx, Rx::Interop::Runtime30::Camera::EProperty::ID ePar, Rx::CRxArrayString& aValue);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Get a camera parameter of type Rx::CRxString from the currently bound camera.
			/// </summary>
			///
			/// <warning> Not all parameters may be supported by all Raytrix cameras. </warning>
			///
			/// <attention>
			/// 	If the parameter referenced by ePar does not relate to a string parameter an Rx::CRxException is
			/// 	thrown.
			/// </attention>
			///
			/// <param name="ePar">    The camera parameter. Allowed parameters from Rx::Interop::Runtime30::Camera::EProperty are:
			/// 					   		- Rx::Interop::Runtime30::Camera::EProperty::DriverName
			/// 					   		- Rx::Interop::Runtime30::Camera::EProperty::RaytrixModelName
			/// 					   		- Rx::Interop::Runtime30::Camera::EProperty::InternalModelName
			/// 					   		- Rx::Interop::Runtime30::Camera::EProperty::HardwareId
			/// 					   		- Rx::Interop::Runtime30::Camera::EProperty::Serial
			/// 					   		- Rx::Interop::Runtime30::Camera::EProperty::TapBalanceMode
			/// 					   		- Rx::Interop::Runtime30::Camera::EProperty::SourceImageFolder. </param>
			/// <param name="sxValue"> [out] The returned string value. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxCamGetPar(Rx::Interop::Runtime30::Camera::EProperty::ID ePar, Rx::CRxString& sxValue);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Get a camera parameter of type unsigned integer from the currently bound camera.
			/// </summary>
			///
			/// <warning> Not all parameters may be supported by all Raytrix cameras. </warning>
			///
			/// <attention>
			/// 	If the parameter referenced by ePar does not relate to an unsigned integer parameter anRx::CRxException is
			/// 	thrown.
			/// </attention>
			///
			/// <param name="ePar">   The camera parameter. Allowed parameters from Rx::Interop::Runtime30::Camera::EProperty are:
			/// 					  		- Rx::Interop::Runtime30::Camera::EProperty::IsColor
			/// 					  		- Rx::Interop::Runtime30::Camera::EProperty::IsBayer
			/// 					  		- Rx::Interop::Runtime30::Camera::EProperty::Width
			/// 					  		- Rx::Interop::Runtime30::Camera::EProperty::Height
			/// 					  		- Rx::Interop::Runtime30::Camera::EProperty::OffsetX
			/// 					  		- Rx::Interop::Runtime30::Camera::EProperty::OffsetY
			/// 					  		- Rx::Interop::Runtime30::Camera::EProperty::Func_CalibMainLens
			/// 					  		- Rx::Interop::Runtime30::Camera::EProperty::PIVMode
			/// 					  		- Rx::Interop::Runtime30::Camera::EProperty::IsOpen
			/// 					  		- Rx::Interop::Runtime30::Camera::EProperty::IsCapturing
			/// 					  		- Rx::Interop::Runtime30::Camera::EProperty::TriggerMode
			/// 					  		- Rx::Interop::Runtime30::Camera::EProperty::ExternalTriggerMode.
			/// 					  		- Rx::Interop::Runtime30::Camera::EProperty::HasIPConfig
			/// 							- Rx::Interop::Runtime30::Camera::EProperty::GlobalStart
			/// 							- Rx::Interop::Runtime30::Camera::EProperty::StrobeOn </param>
			/// <param name="uValue"> [out] The returned unsigned integer value. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxCamGetPar(Rx::Interop::Runtime30::Camera::EProperty::ID ePar, unsigned& uValue);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Get camera parameter of type double from the currently bound camera.
			/// </summary>
			///
			/// <warning> Not all parameters may be supported by all Raytrix cameras. </warning>
			///
			/// <attention>
			/// 	If the parameter referenced by ePar does not relate to an double parameter an Rx::CRxException is thrown.
			/// 	thrown.
			/// </attention>
			///
			/// <param name="ePar">   The camera parameter ID. Allowed parameters from Rx::Interop::Runtime30::Camera::EProperty are:
			/// 						- Camera
			/// 					  		- Rx::Interop::Runtime30::Camera::EProperty::Exposure
			/// 					  		- Rx::Interop::Runtime30::Camera::EProperty::TapBalance
			/// 					  		- Rx::Interop::Runtime30::Camera::EProperty::Gain
			/// 					  		- Rx::Interop::Runtime30::Camera::EProperty::GainRed
			/// 					  		- Rx::Interop::Runtime30::Camera::EProperty::GainGreen
			/// 					  		- Rx::Interop::Runtime30::Camera::EProperty::GainBlue
			/// 					  		- Rx::Interop::Runtime30::Camera::EProperty::FramesPerSecond
			/// 					  		- Rx::Interop::Runtime30::Camera::EProperty::ActualFramesPerSecond
			/// 					  		- Rx::Interop::Runtime30::Camera::EProperty::Focus
			/// 					  		- Rx::Interop::Runtime30::Camera::EProperty::Iris
			/// 					  		- Rx::Interop::Runtime30::Camera::EProperty::Temperature.
			/// 					  		- Rx::Interop::Runtime30::Camera::EProperty::StrobeLength1
			/// 							- Rx::Interop::Runtime30::Camera::EProperty::StrobeLength2
			/// 							- Rx::Interop::Runtime30::Camera::EProperty::StrobeDelay1
			/// 							- Rx::Interop::Runtime30::Camera::EProperty::StrobeDelay2  </param>
			/// <param name="dValue"> [out] The returned double value. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxCamGetPar(Rx::Interop::Runtime30::Camera::EProperty::ID ePar, double& dValue);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Get camera parameter of type Rx::CRxArrayString.
			/// </summary>
			///
			/// <warning> Not all parameters may be supported by all Raytrix cameras. </warning>
			///
			/// <attention>
			/// 	If the parameter referenced by ePar does not relate to an string-array parameter an Rx::CRxException is
			/// 	thrown.
			/// </attention>
			///
			/// <param name="ePar">   The camera parameter. </param>
			/// <param name="aValue"> [out] The returned Rx::CRxArrayString value. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxCamGetPar(Rx::Interop::Runtime30::Camera::EProperty::ID ePar, Rx::CRxArrayString& aValue);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Set a camera property of type Rx::CRxString.
			/// </summary>
			///
			/// <warning> Not all parameters may be supported by all Raytrix cameras. </warning>
			///
			/// <attention>
			/// 	If the parameter referenced by ePar does not relate to an unsigned integer parameter an Rx::CRxException is
			/// 	thrown.
			/// </attention>
			///
			/// <param name="uCamIdx"> The zero-based camera index. </param>
			/// <param name="ePar">    The camera parameter. Allowed parameters from Rx::Interop::Runtime30::Camera::EProperty are:
			/// 					   		- Camera
			/// 					   			- Rx::Interop::Runtime30::Camera::EProperty::TapBalanceMode
			/// 					   			- Rx::Interop::Runtime30::Camera::EProperty::SourceImageFolder. </param>
			/// <param name="sxValue"> The string value. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxCamSetPar(unsigned uCamIdx, Rx::Interop::Runtime30::Camera::EProperty::ID ePar, const Rx::CRxString& sxValue);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Set a camera property of type unsigned integer.
			/// </summary>
			///
			/// <warning> Not all parameters may be supported by all Raytrix cameras. </warning>
			///
			/// <attention>
			/// 	If the parameter referenced by \a ePar does not relate to an unsigned integer parameter an Rx::CRxException
			/// 	is thrown.
			/// </attention>
			///
			/// <param name="uCamIdx"> The zero-based camera index. </param>
			/// <param name="ePar">    The camera parameter. Allowed parameters from Rx::Interop::Runtime30::Camera::EProperty are:
			/// 					   	- Camera
			/// 					   		- Rx::Interop::Runtime30::Camera::EProperty::Func_CalibMainLens
			/// 					   		- Rx::Interop::Runtime30::Camera::EProperty::PIVMode
			/// 					   		- Rx::Interop::Runtime30::Camera::EProperty::TriggerMode
			/// 					   		- Rx::Interop::Runtime30::Camera::EProperty::ExternalTriggerMode
			/// 							- Rx::Interop::Runtime30::Camera::EProperty::GlobalStart
			/// 							- Rx::Interop::Runtime30::Camera::EProperty::StrobeOn </param>
			/// <param name="uValue">  The unsigned integer value. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxCamSetPar(unsigned uCamIdx, Rx::Interop::Runtime30::Camera::EProperty::ID ePar, unsigned uValue);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Set a camera property of type double.
			/// </summary>
			///
			/// <warning> Not all parameters may be supported by all Raytrix cameras. </warning>
			///
			/// <attention>
			/// 	If the parameter referenced by ePar does not relate to an double parameter an Rx::CRxException is thrown.
			/// </attention>
			///
			/// <param name="uCamIdx"> The zero-based camera index. </param>
			/// <param name="ePar">    The camera parameter. Allowed parameters from Rx::Interop::Runtime30::Camera::EProperty are:
			/// 					   - Camera
			/// 					   	- Rx::Interop::Runtime30::Camera::EProperty::Exposure
			/// 					   	- Rx::Interop::Runtime30::Camera::EProperty::TapBalance
			/// 					   	- Rx::Interop::Runtime30::Camera::EProperty::Gain
			/// 					   	- Rx::Interop::Runtime30::Camera::EProperty::GainRed
			/// 					   	- Rx::Interop::Runtime30::Camera::EProperty::GainGreen
			/// 					   	- Rx::Interop::Runtime30::Camera::EProperty::GainBlue
			/// 					   	- Rx::Interop::Runtime30::Camera::EProperty::FramesPerSecond
			/// 						- Rx::Interop::Runtime30::Camera::EProperty::Focus
			/// 						- Rx::Interop::Runtime30::Camera::EProperty::Iris
			/// 						- Rx::Interop::Runtime30::Camera::EProperty::StrobeLength1
			/// 						- Rx::Interop::Runtime30::Camera::EProperty::StrobeLength2
			/// 						- Rx::Interop::Runtime30::Camera::EProperty::StrobeDelay1
			/// 						- Rx::Interop::Runtime30::Camera::EProperty::StrobeDelay2  </param>
			/// <param name="dValue">  The double value. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxCamSetPar(unsigned uCamIdx, Rx::Interop::Runtime30::Camera::EProperty::ID ePar, double dValue);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Set a camera property of type Rx::CRxString from the currently bound camera.
			/// </summary>
			///
			/// <warning> Not all parameters may be supported by all Raytrix cameras. </warning>
			///
			/// <attention>
			/// 	If the parameter referenced by \a ePar does not relate to an unsigned integer parameter an Rx::CRxException
			/// 	is thrown.
			/// </attention>
			///
			/// <param name="ePar">    The camera parameter. Allowed parameters from Rx::Interop::Runtime30::Camera::EProperty are:
			/// 					   - Camera
			/// 					   	- Rx::Interop::Runtime30::Camera::EProperty::TapBalanceMode
			/// 					   	- Rx::Interop::Runtime30::Camera::EProperty::SourceImageFolder. </param>
			/// <param name="sxValue"> The string value. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxCamSetPar(Rx::Interop::Runtime30::Camera::EProperty::ID ePar, const Rx::CRxString& sxValue);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Set a camera property of type unsigned integer from the currently bound camera.
			/// </summary>
			///
			/// <warning> Not all parameters may be supported by all Raytrix cameras. </warning>
			///
			/// <attention>
			/// 	If the parameter referenced by ePar does not relate to an unsigned integer parameter an Rx::CRxException is
			/// 	thrown.
			/// </attention>
			///
			/// <param name="ePar">   The camera parameter. Allowed parameters from Rx::Interop::Runtime30::Camera::EProperty are:
			/// 					  - Camera
			/// 						- Rx::Interop::Runtime30::Camera::EProperty::Func_CalibMainLens
			/// 						- Rx::Interop::Runtime30::Camera::EProperty::PIVMode
			/// 						- Rx::Interop::Runtime30::Camera::EProperty::TriggerMode
			/// 						- Rx::Interop::Runtime30::Camera::EProperty::ExternalTriggerMode
			/// 						- Rx::Interop::Runtime30::Camera::EProperty::GlobalStart
			/// 						- Rx::Interop::Runtime30::Camera::EProperty::StrobeOn </param>
			/// <param name="uValue"> The unsigned integer value. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxCamSetPar(Rx::Interop::Runtime30::Camera::EProperty::ID ePar, unsigned uValue);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Set a camera property of type double
			/// </summary>
			///
			/// <warning> Not all parameters may be supported by all Raytrix cameras. </warning>
			///
			/// <attention>
			/// 	If the parameter referenced by \a ePar does not relate to an double parameter an Rx::CRxException is thrown.
			/// </attention>
			///
			/// <param name="ePar">   The camera parameter. Allowed parameters from Rx::Interop::Runtime30::Camera::EProperty are:
			/// 					  - Camera
			/// 					  	- Rx::Interop::Runtime30::Camera::EProperty::Exposure
			/// 					  	- Rx::Interop::Runtime30::Camera::EProperty::TapBalance
			/// 					  	- Rx::Interop::Runtime30::Camera::EProperty::Gain
			/// 					  	- Rx::Interop::Runtime30::Camera::EProperty::GainRed
			/// 					  	- Rx::Interop::Runtime30::Camera::EProperty::GainGreen
			/// 					  	- Rx::Interop::Runtime30::Camera::EProperty::GainBlue
			/// 					  	- Rx::Interop::Runtime30::Camera::EProperty::FramesPerSecond
			/// 					  	- Rx::Interop::Runtime30::Camera::EProperty::Focus
			/// 					  	- Rx::Interop::Runtime30::Camera::EProperty::Iris
			/// 						- Rx::Interop::Runtime30::Camera::EProperty::StrobeLength1
			/// 					    - Rx::Interop::Runtime30::Camera::EProperty::StrobeLength2
			/// 					    - Rx::Interop::Runtime30::Camera::EProperty::StrobeDelay1
			/// 						- Rx::Interop::Runtime30::Camera::EProperty::StrobeDelay2  </param>
			/// <param name="dValue"> The double value. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxCamSetPar(Rx::Interop::Runtime30::Camera::EProperty::ID ePar, double dValue);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Get the parameter range of a camera parameter of type unsigned integer.
			/// </summary>
			///
			/// <param name="uCamIdx"> The zero-based camera index. </param>
			/// <param name="ePar">    The camera parameter. Allowed parameters from Rx::Interop::Runtime30::Camera::EProperty are:
			/// 					   - Camera
			/// 					   		- Rx::Interop::Runtime30::Camera::EProperty::IsColor
			/// 					   		- Rx::Interop::Runtime30::Camera::EProperty::IsBayer
			/// 					   		- Rx::Interop::Runtime30::Camera::EProperty::PIVMode
			/// 					   		- Rx::Interop::Runtime30::Camera::EProperty::IsOpen
			/// 					   		- Rx::Interop::Runtime30::Camera::EProperty::IsCapturing
			/// 					   		- Rx::Interop::Runtime30::Camera::EProperty::TriggerMode
			/// 					   		- Rx::Interop::Runtime30::Camera::EProperty::ExternalTriggerMode. </param>
			/// <param name="uMin">    [out] On return the minimal parameter value. </param>
			/// <param name="uMax">    [out] On return the maximal parameter value. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxCamGetParRange(unsigned uCamIdx, Rx::Interop::Runtime30::Camera::EProperty::ID ePar, unsigned& uMin, unsigned& uMax);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Get the parameter range of a camera parameter of type double
			/// </summary>
			///
			/// <param name="uCamIdx"> The zero-based camera index. </param>
			/// <param name="ePar">    The camera parameter. Allowed parameters from Rx::Interop::Runtime30::Camera::EProperty are:
			/// 					   	- Camera
			/// 					   		- Rx::Interop::Runtime30::Camera::EProperty::TapBalance
			/// 					   		- Rx::Interop::Runtime30::Camera::EProperty::Gain
			/// 					   		- Rx::Interop::Runtime30::Camera::EProperty::GainRed
			/// 					   		- Rx::Interop::Runtime30::Camera::EProperty::GainGreen
			/// 					   		- Rx::Interop::Runtime30::Camera::EProperty::GainBlue. </param>
			/// <param name="dMin">    [out] On return the minimal parameter value. </param>
			/// <param name="dMax">    [out] On return the maximal parameter value. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxCamGetParRange(unsigned uCamIdx, Rx::Interop::Runtime30::Camera::EProperty::ID ePar, double& dMin, double& dMax);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Get a set of available values for a parameter of type unsigned integer
			/// </summary>
			///
			/// <param name="uCamIdx">  The zero-based camera index. </param>
			/// <param name="ePar">	    The camera parameter. </param>
			/// <param name="auValues"> [out] The list of available values. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxCamGetParRange(unsigned uCamIdx, Rx::Interop::Runtime30::Camera::EProperty::ID ePar, Rx::CRxArrayUInt& auValues);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Get the parameter range of a camera parameter of type <c>unsigned</c> <c>integer</c> from the currently bound camera.
			/// </summary>
			///
			/// <param name="ePar"> The camera parameter. Allowed parameters from Rx::Interop::Runtime30::Camera::EProperty are:
			/// 					- Camera
			/// 						- Rx::Interop::Runtime30::Camera::EProperty::IsColor
			/// 						- Rx::Interop::Runtime30::Camera::EProperty::IsBayer
			/// 						- Rx::Interop::Runtime30::Camera::EProperty::PIVMode
			/// 						- Rx::Interop::Runtime30::Camera::EProperty::IsOpen
			/// 						- Rx::Interop::Runtime30::Camera::EProperty::IsCapturing
			/// 						- Rx::Interop::Runtime30::Camera::EProperty::TriggerMode
			/// 						- Rx::Interop::Runtime30::Camera::EProperty::ExternalTriggerMode. </param>
			/// <param name="uMin"> [out] On return the minimal parameter value. </param>
			/// <param name="uMax"> [out] On return the maximal parameter value. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxCamGetParRange(Rx::Interop::Runtime30::Camera::EProperty::ID ePar, unsigned& uMin, unsigned& uMax);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Get the parameter range of a camera parameter of type <c>double</c> from the currently bound camera.
			/// </summary>
			///
			/// <param name="ePar"> The camera parameter. Allowed parameters from Rx::Interop::Runtime30::Camera::EProperty are:
			/// 						- Camera
			/// 							- Rx::Interop::Runtime30::Camera::EProperty::TapBalance
			/// 							- Rx::Interop::Runtime30::Camera::EProperty::Gain
			/// 							- Rx::Interop::Runtime30::Camera::EProperty::GainRed
			/// 							- Rx::Interop::Runtime30::Camera::EProperty::GainGreen
			/// 							- Rx::Interop::Runtime30::Camera::EProperty::GainBlue. </param>
			/// <param name="dMin"> [out] On return the minimal parameter value. </param>
			/// <param name="dMax"> [out] On return the maximal parameter value. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxCamGetParRange(Rx::Interop::Runtime30::Camera::EProperty::ID ePar, double& dMin, double& dMax);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Get set of available values for parameter of type unsigned.
			/// </summary>
			///
			/// <param name="ePar">	    The camera parameter. </param>
			/// <param name="auValues"> [out] The list of available values. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxCamGetParRange(Rx::Interop::Runtime30::Camera::EProperty::ID ePar, Rx::CRxArrayUInt& auValues);

		public:

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Create a new ray image.
			///
			/// 	The allowed pixel types of ray images are
			/// 	 - Rx::Interop::Runtime28::EPixelType::RGB
			/// 	 - Rx::Interop::Runtime28::EPixelType::RGBA
			/// 	 - Rx::Interop::Runtime28::EPixelType::BGR
			/// 	 - Rx::Interop::Runtime28::EPixelType::BGRA
			/// 	 - Rx::Interop::Runtime28::EPixelType::Lum
			/// 	 - Rx::Interop::Runtime28::EPixelType::LumA
			/// 	 - Rx::Interop::Runtime28::EPixelType::BayerBG
			/// 	 - Rx::Interop::Runtime28::EPixelType::BayerGB
			/// 	 - Rx::Interop::Runtime28::EPixelType::BayerGR
			/// 	 - Rx::Interop::Runtime28::EPixelType::BayerRG
			/// 	 - Rx::Interop::Runtime28::EPixelType::YUV420P.
			///
			/// 	Returns the ray handle, which you can use in:
			/// 	 - Rx::LFR::CApiLF::RxRayDelete
			/// 	 - Rx::LFR::CApiLF::RxRaySave
			/// 	 - Rx::LFR::CApiLF::RxRayCalibSaveXML
			/// 	 - Rx::LFR::CApiLF::RxRayCalibXmlGet
			/// 	 - Rx::LFR::CApiLF::RxRayBind
			/// 	 - Rx::LFR::CApiLF::RxRayGetFormat
			/// 	 - Rx::LFR::CApiLF::RxRayGetRaw
			/// 	 - Rx::LFR::CApiLF::RxRayGetMetaData
			/// 	 - Rx::LFR::CApiLF::RxRaySetMetaData.
			/// </summary>
			///
			/// <param name="xF"> The ray image format. </param>
			///
			/// <returns> The ray image handle of the ray image. </returns>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static unsigned RxRayNew(const Rx::CRxImageFormat& xF);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Load a ray image.
			/// </summary>
			///
			/// <param name="sxFilename"> The ray image filename. </param>
			///
			/// <returns> The ray image handle of the ray image. </returns>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static unsigned RxRayLoad(const Rx::CRxString& sxFilename);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Delete the image with the given ID.
			/// </summary>
			///
			/// <attention>
			/// 	If the ray image referenced by \p uRayHandle is currently bound by a previous call to Rx::LFR::CApiLF::RxRayBind or
			/// 	Rx::LFR::CApiLF::RxCamStartCapture, the image is not deleted and an exception is thrown.
			/// </attention>
			///
			/// <param name="uRayHandle"> The handle of the ray image to delete. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxRayDelete(unsigned uRayHandle);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Saves the given light field image to the given file.
			///
			/// 	This augments the meta data with information from the current light field environment and saves them along the image
			/// 	data. These information contain the current algorithm parameter.
			/// </summary>
			///
			/// <param name="uRayHandle">	   The ID of the light field image created by calling RxRayLoad, RxRaySeqBind or RxCamBind. </param>
			/// <param name="sxFilename">	   The complete file path. </param>
			/// <param name="bUpdateMetaData"> True to update the current meta data so that they are available in the next call to
			/// 							   RxRayGetMetaData; false to update a COPY of the current meta data so that they are NOT
			/// 							   available in the next call to RxRayGetMetaData. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxRaySave(unsigned uRayHandle, const Rx::CRxString& sxFilename, bool bUpdateMetaData);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Saves the bound light field image to the given file.
			///
			/// 	This augments the meta data with information from the current light field environment and saves them along the image
			/// 	data. These information contain the current algorithm parameter.
			/// </summary>
			///
			/// <param name="sxFilename">	   The complete file path. </param>
			/// <param name="bUpdateMetaData"> True to update the current meta data so that they are available in the next call to
			/// 							   RxRayGetMetaData; false to update a COPY of the current meta data so that they are NOT
			/// 							   available in the next call to RxRayGetMetaData. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxRaySave(const Rx::CRxString& sxFilename, bool bUpdateMetaData);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Save calibration data of ray image in XML format.
			/// </summary>
			///
			/// <param name="uRayHandle"> The ID of the ray image whose calibration data is to be saved. </param>
			/// <param name="sxFilename"> The complete file path under which to save the data. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxRayCalibSaveXML(unsigned uRayHandle, const Rx::CRxString& sxFilename);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Get the calibration data of the given ray image as XML string.
			/// </summary>
			///
			/// <param name="uRayHandle"> The ID of the ray image whose calibration data is to be saved. </param>
			/// <param name="sxXml">	  [out] On successful return contains the XML string. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxRayCalibXmlGet(unsigned uRayHandle, Rx::CRxString& sxXml);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Gets the pointer to the internal camera format.
			/// </summary>
			///
			/// <returns> The pointer to the internal camera format. </returns>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static const void* RxRayGetCameraFormat();

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Bind a ray image to perform computations on.
			/// </summary>
			///
			/// <param name="uRayHandle"> The ID of the light field image that is to be used for calculations. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxRayBind(unsigned uRayHandle);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Unbind the currently bound ray image.
			/// </summary>
			///
			/// <warning>
			/// 	If no ray image is bound the function does nothing. If a ray sequence or a camera is bound, the function throws an
			/// 	exception.
			/// </warning>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxRayUnbind();

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Get the image format of a ray image.
			/// </summary>
			///
			/// <param name="uRayHandle"> The ray image handle. </param>
			/// <param name="xF">		  [out] On return contains the image format of the ray image. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxRayGetFormat(unsigned uRayHandle, Rx::CRxImageFormat& xF);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Gets the image timestamp of the given light field image. Is 0 if the image hasn't a valid timestamp. You can use this
			/// 	timestamp and the timestamp of another camera or sequence frame to determine the time between them.
			/// </summary>
			///
			/// <param name="uRayHandle"> The ID of the light field image created by calling RxRayLoad, RxRaySeqBind or RxCamBind. </param>
			///
			/// <returns> The timestamp. </returns>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static double RxRayGetTimestap(unsigned uRayHandle);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Gets the image timestamp of the bound light field image. Is 0 if the image hasn't a valid timestamp. You can use this
			/// 	timestamp and the timestamp of another camera or sequence frame to determine the time between them.
			/// </summary>
			///
			/// <returns> The timestamp. </returns>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static double RxRayGetTimestap();

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Gets the frame ID of the given light field image. Used when working with sequences or cameras.
			/// </summary>
			///
			/// <param name="uRayHandle"> The ID of the light field image created by calling RxRayLoad, RxRaySeqBind or RxCamBind. </param>
			///
			/// <returns> The frame ID. </returns>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static unsigned RxRayGetFrameID(unsigned uRayHandle);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Gets the frame ID of the bound light field image. Used when working with sequences or cameras.
			/// </summary>
			///
			/// <returns> The frame ID. </returns>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static unsigned RxRayGetFrameID();

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Get the ray image as Rx::CRxImage instance.
			/// </summary>
			///
			/// <param name="uRayHandle"> The ray image handle. </param>
			/// <param name="xRawImage">  [out] On return contains the ray image. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxRayGetRaw(unsigned uRayHandle, Rx::CRxImage& xRawImage);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Get the ray image.
			/// </summary>
			///
			/// <attention>
			/// 	If Create is true, the necessary memory for the image is created with a call to
			/// 	Rx::Interop::Runtime28::IImage::Create, otherwise it is expected that pRawImage is already allocated with the correct
			/// 	amount of memory.
			/// </attention>
			///
			/// <param name="uRayHandle"> The ray image handle. </param>
			/// <param name="pRawImage">  [out] Pointer to an IImage interface. </param>
			/// <param name="bCreate">    Flag whether to create image. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxRayGetRaw(unsigned uRayHandle, Rx::Interop::Runtime28::IImage* pRawImage, bool bCreate);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Get meta data of a ray image.
			///
			/// 	The meta data class CRxMetaData can contain any number of meta data elements of types unsigned, double and
			/// 	Rx::CRxString. You can get, set and add elements to the meta data instance and store this together with the ray image.
			/// </summary>
			///
			/// <param name="xMetaData"> [out] Contains the ray image meta data on return. </param>
			/// <param name="uImgID">    The ray image handle. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxRayGetMetaData(Rx::CRxMetaData& xMetaData, unsigned uImgID);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Get the meta data of the bound ray image.
			///
			/// 	The meta data class CRxMetaData can contain any number of meta data elements of types unsigned, double and
			/// 	Rx::CRxString. You can get, set and add elements to the meta data instance and store this together with the ray image.
			/// </summary>
			///
			/// <param name="xMetaData"> [out] Contains the ray image meta data on return. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxRayGetMetaData(Rx::CRxMetaData& xMetaData);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Set meta data of a ray image.
			/// </summary>
			///
			/// <attention>
			/// 	The meta data class CRxMetaData can contain any number of meta data elements of types unsigned, double and
			/// 	Rx::CRxString. You can get, set and add elements to the meta data instance and store this together with the ray image.
			/// </attention>
			///
			/// <param name="uRayHandle"> The ray image handle. </param>
			/// <param name="xMetaData">  The ray image meta data to set. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxRaySetMetaData(unsigned uRayHandle, const Rx::CRxMetaData& xMetaData);

		public:

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Open a ray sequence. Depending on the mode a ray sequence can be opened for reading or writing.
			/// </summary>
			///
			/// <attention> Returns the ray sequence handle. </attention>
			///
			/// <param name="sxFilename">		 The complete file path to the ray sequence. </param>
			/// <param name="uMode">			 The ray sequence mode. This is a combination of elements of Rx::ERaySeqMode . </param>
			/// <param name="uFrameBufferCount"> The number of frame buffers used for buffered writing/reading. </param>
			///
			/// <returns> The ray sequence id. This id is used in other functions to reference the ray sequence. </returns>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static unsigned RxRaySeqOpen(const Rx::CRxString& sxFilename, unsigned uMode, unsigned uFrameBufferCount);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Close a ray sequence.
			/// </summary>
			///
			/// <warning>
			/// 	Closing a ray sequence also unbinds the corresponding ray image. The ray sequence ID becomes invalid once the ray
			/// 	sequence has been closed.
			/// </warning>
			///
			/// <param name="uRaySeqHandle"> The id of the ray sequence. </param>
			///
			/// <returns> The number of frames written (if sequence was in write mode). </returns>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static unsigned RxRaySeqClose(unsigned uRaySeqHandle);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Bind a ray sequence for use by other API functions.
			///
			/// 	Only one ray sequence for reading and one ray sequence for writing can be bound at a time. When a ray sequence	is bound
			/// 	for reading, then any currently bound ray image is unbound, a new prototype ray image of the format of the ray sequence
			/// 	is created and bound and the first image of the ray sequence is loaded into the bound ray image.The ID of the newly
			/// 	created ray image is returned. No new ray image can be bound until the ray sequence is unbound using
			/// 	Rx::LFR::CApiLF::RxRaySeqUnbind .If a camera capture is started while a ray sequence is bound for reading, the ray sequence is
			/// 	automatically unbound. While a camera is in capture mode, no ray sequence can be bound for reading.
			///
			/// 	When a ray sequence is bound for writing a ray image must already be bound. If the ray sequence is empty up to now, the
			/// 	ray sequence is created for the currently bound image type and only ray images of the same format can be written to the
			/// 	ray sequence.Also only ray images of the same format can be bound while the ray sequence is bound. If the ray sequence
			/// 	already contains images, it can only be bound if the currently bound ray image format is of the same format as the ray
			/// 	sequence. If a ray sequence in write mode is bound and camera capture is started the ray sequence is also unbound if
			/// 	the image formats do not agree.To capture frames from a camera, first start the camera capture, then bind the ray
			/// 	sequence in write mode and set the parameter Rx::LFR::Params::EApiLF::RaySeq_AutoStoreCamFrames to 1. The value returned is the
			/// 	ray image ID of the currently bound ray image.
			/// </summary>
			///
			/// <param name="uRaySeqHandle"> The id of the ray sequence. </param>
			///
			/// <returns> the currently bound ray image handle. </returns>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static unsigned RxRaySeqBind(unsigned uRaySeqHandle);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Determines if a sequence is bound for reading to the API.
			/// </summary>
			///
			/// <returns> True if a sequence in read mode is bound, false if not. </returns>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static bool RxRaySeqIsBound();

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Unbind a ray sequence. If a ray sequence in write mode is unbound, the currently bound ray image stays bound. No more
			/// 	images can be written to the ray sequence once it has been unbound, however, the ray sequence has not been closed. It
			/// 	can be bound again to write further ray images to it.
			///
			/// 	If a ray sequence in read mode is unbound, the currently bound ray image stays bound. The ray image is therefore also
			/// 	not removed from memory.
			/// </summary>
			///
			/// <warning> You will have to unbind the ray image and then delete it to free all memory. </warning>
			///
			/// <param name="uRaySeqHandle"> The ray sequence ID of the ray sequence to unbind. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxRaySeqUnbind(unsigned uRaySeqHandle);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Read a frame from the currently bound ray sequence.
			/// </summary>
			///
			/// <pre> A ray sequence in read mode must have been bound beforehand. </pre>
			///
			/// <attention>
			/// 	This function reads the current frame from the ray sequence and advanced the frame pointer by one frame.The ray image
			/// 	is read into the currently bound ray image and the image is automatically copied onto the CUDA device. This means that
			/// 	the function Rx::LFR::CApiLF::RxRaySeqGetFrameIndex returns a frame index higher than before after calling
			/// 	Rx::LFR::CApiLF::RxRaySeqRead.
			/// </attention>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxRaySeqRead();

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Write currently bound ray image to currently bound ray sequence.
			///
			/// 	This function appends the currently bound ray image to the bound ray sequence.
			/// </summary>
			///
			/// <attention>
			/// 	To automatically write frames captured from a camera device to the bound ray sequence, set the parameter
			/// 	Rx::LFR::Params::EApiLF::RaySeq_AutoStoreCamFrames to 1.
			/// </attention>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxRaySeqWrite();

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Get number of frame buffers in use.
			/// </summary>
			///
			/// <param name="uRaySeqHandle"> The ray sequence id. </param>
			///
			/// <returns> The number of frames in use in the frame buffer. </returns>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static unsigned RxRaySeqGetFrameBufferUsedCount(unsigned uRaySeqHandle);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Receive ray sequence frame count.
			/// </summary>
			///
			/// <param name="uRaySeqHandle"> Identifier for the ray sequence. </param>
			///
			/// <returns> Number of frames. </returns>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static unsigned RxRaySeqGetFrameCount(unsigned uRaySeqHandle);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Get number of frames in ray sequence that is currently bound in read mode.
			/// </summary>
			///
			/// <returns> Number of frames. </returns>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static unsigned RxRaySeqGetFrameCount();

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Get the total file size of the ray sequence in bytes.
			/// </summary>
			///
			/// <param name="uRaySeqHandle"> The ray sequence id. </param>
			/// <param name="uFileSize">	 [out] Contains the total size of the ray sequence in bytes. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxRaySeqGetFileSize(unsigned uRaySeqHandle, unsigned __int64& uFileSize);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Get current frame index of ray sequence.
			/// </summary>
			///
			/// <param name="uRaySeqHandle"> The ray sequence id. </param>
			///
			/// <returns> The frame index on return. </returns>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static unsigned RxRaySeqGetFrameIndex(unsigned uRaySeqHandle);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Set the current frame index of ray sequence.
			/// </summary>
			///
			/// <param name="uRaySeqHandle"> The ray sequence id. </param>
			/// <param name="uFrameIdx">	 The frame index. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxRaySeqSetFrameIndex(unsigned uRaySeqHandle, unsigned uFrameIdx);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Move the frame index relative to the current position in the ray sequence.
			/// </summary>
			///
			/// <param name="uRaySeqHandle"> The ray sequence id. </param>
			/// <param name="iStep">		 The number of frames to move. Negative values move frame index backward. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxRaySeqMoveFrameIndex(unsigned uRaySeqHandle, int iStep);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Get the doubleshot mode used when recording the given sequence.
			/// </summary>
			///
			/// <param name="uRaySeqHandle"> The ray sequence id. </param>
			///
			/// <returns> The doubleshot mode. </returns>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static unsigned RxRaySeqGetDoubleShotMode(unsigned uRaySeqHandle);

		public:

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Get OpenGL version of current OpenGL rendering context.
			/// </summary>
			///
			/// <warning> This function only return a meaningful result if it is called within an active OpenGL rendering context. </warning>
			///
			/// <param name="iMajor"> [out] On return contains the OpenGL major version. </param>
			/// <param name="iMinor"> [out] On return contains the OpenGL minor version. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxGlGetVersion(int& iMajor, int& iMinor);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Copy CUDA result images to OpenGL textures.
			///
			/// 	The internal image IDs that can be used with this function are those declared in Rx::LFR::CApiLF::EImgID. Combining a number
			/// 	of image IDs by OR, updates all the related textures.
			/// </summary>
			///
			/// <param name="uIntImgIDs">	  Internal image ID. A number of internal image IDs can be combined with OR operation. </param>
			/// <param name="bCreateMipmaps"> (optional) the create mipmaps flag. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxGlUpdateTex(unsigned uIntImgIDs, bool bCreateMipmaps = false);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Get the OpenGL texture ID corresponding to given parameter <c>eImgID</c> The content of this texture can be updated
			/// 	with the Rx::LFR::CApiLF::RxGlUpdateTex function.
			/// </summary>
			///
			/// <param name="eImgID">	    The image ID. </param>
			/// <param name="uGlTextureID"> [out] Identifier for the OpenGL texture. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxGlGetTextureID(LFR::EImage::ID eImgID, unsigned& uGlTextureID);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Get the OpenGL texture ID corresponding to given parameter <c>eImgID</c> The content of this texture can be updated
			/// 	with the Rx::LFR::CApiLF::RxGlUpdateTex function.
			/// </summary>
			///
			/// <param name="eImgID"> The image ID. </param>
			///
			/// <returns> The identifier for the OpenGL texture. </returns>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static unsigned RxGlGetTextureID(LFR::EImage::ID eImgID);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Assigns the OpenGL context created by Rx::LFR::CApiLF::RxCudaSelectDevice to the calling thread.
			/// </summary>
			///
			/// <pre>
			/// 	Before assigning a context, the thread that has the context currently must release it via
			/// 	Rx::LFR::CApiLF::RxGlReleaseContext().
			/// </pre>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxGlGetContext();

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Releases the OpenGL context owned by the calling thread.
			/// </summary>
			///
			/// <warning>
			/// 	Another thread can get the released context via Rx::LFR::CApiLF::RxGlGetContext. If the calling thread hasn't a valid context
			/// 	this function will do nothing and only returns.
			/// </warning>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxGlReleaseContext();

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Store the threads current OpenGL context. The context can be retrieved with RxGlGetContext() and released with
			/// 	RxGlReleaseContext.
			/// </summary>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxGlSetContext();

		public:

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Sets the value of a parameter.
			/// </summary>
			///
			/// <param name="ePar">   The ID of the parameter. </param>
			/// <param name="uValue"> [in] The value of the parameter. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxSetPar(Rx::LFR::Params::EApiLF::ID ePar, unsigned uValue);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Gets the value of a parameter.
			/// </summary>
			///
			/// <param name="ePar">   The ID of the parameter. </param>
			/// <param name="uValue"> [out] The value of the parameter. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxGetPar(Rx::LFR::Params::EApiLF::ID ePar, unsigned& uValue);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Get the value range of a parameter.
			/// </summary>
			///
			/// <param name="ePar">   The ID of the parameter. </param>
			/// <param name="uMin"> [out] The min allowed value of the parameter. </param>
			/// <param name="uMax"> [out] The max allowed value of the parameter. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxGetParRange(Rx::LFR::Params::EApiLF::ID ePar, unsigned& uMin, unsigned& uMax);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Get the string representation of a parameter.
			/// </summary>
			///
			/// <param name="ePar">   The parameter ID. </param>
			/// <param name="sValue"> [out] On return contains the parameter string representation. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxGetParName(Rx::LFR::Params::EApiLF::ID ePar, Rx::CRxString& sValue);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Get the Properties of a parameter.
			/// </summary>
			///
			/// <param name="ePar">			  The parameter ID. </param>
			/// <param name="sValue">		  [out] On return contains the parameter string representation. </param>
			/// <param name="bReadAccess">    [out] On return contains the parameter ReadAccess flag. </param>
			/// <param name="bWriteAccess">   [out] On return contains the parameter WriteAccess flag. </param>
			/// <param name="eParameterType"> [out] On return contains the parameter DataType. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxGetParProperties(Rx::LFR::Params::EApiLF::ID ePar, Rx::CRxString& sValue, bool& bReadAccess, bool& bWriteAccess, EValueType::ID& eParameterType);

		public:

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Sets the value of a parameter.
			/// </summary>
			///
			/// <param name="ePar">   The ID of the parameter. </param>
			/// <param name="uValue"> [in] The value of the parameter. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxSetPar(Rx::LFR::Params::ECudaCompute::ID ePar, unsigned uValue);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Sets the value of a parameter.
			/// </summary>
			///
			/// <param name="ePar">   The ID of the parameter. </param>
			/// <param name="dValue"> [in] The value of the parameter. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxSetPar(Rx::LFR::Params::ECudaCompute::ID ePar, double dValue);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Sets the value of a parameter.
			/// </summary>
			///
			/// <param name="ePar">   The ID of the parameter. </param>
			/// <param name="sValue"> [in] The value of the parameter. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxSetPar(Rx::LFR::Params::ECudaCompute::ID ePar, const Rx::CRxString& sValue);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Sets the value of a parameter.
			/// </summary>
			///
			/// <param name="ePar">   The ID of the parameter. </param>
			/// <param name="auValue"> [in] The value of the parameter. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxSetPar(Rx::LFR::Params::ECudaCompute::ID ePar, const Rx::CRxArrayUInt& auValue);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Sets the value of a parameter.
			/// </summary>
			///
			/// <param name="ePar">   The ID of the parameter. </param>
			/// <param name="adValue"> [in] The value of the parameter. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxSetPar(Rx::LFR::Params::ECudaCompute::ID ePar, const Rx::CRxArrayDouble& adValue);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Sets the value of a parameter.
			/// </summary>
			///
			/// <param name="ePar">    The ID of the parameter. </param>
			/// <param name="asValue"> [in] The value of the parameter. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxSetPar(Rx::LFR::Params::ECudaCompute::ID ePar, const Rx::CRxArrayString& asValue);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Gets the value of a parameter.
			/// </summary>
			///
			/// <param name="ePar">   The ID of the parameter. </param>
			/// <param name="uValue"> [out] The value of the parameter. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxGetPar(Rx::LFR::Params::ECudaCompute::ID ePar, unsigned& uValue);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Gets the value of a parameter.
			/// </summary>
			///
			/// <param name="ePar">   The ID of the parameter. </param>
			/// <param name="dValue"> [out] The value of the parameter. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxGetPar(Rx::LFR::Params::ECudaCompute::ID ePar, double& dValue);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Gets the value of a parameter.
			/// </summary>
			///
			/// <param name="ePar">   The ID of the parameter. </param>
			/// <param name="sValue"> [out] The value of the parameter. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxGetPar(Rx::LFR::Params::ECudaCompute::ID ePar, Rx::CRxString& sValue);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Gets the value of a parameter.
			/// </summary>
			///
			/// <param name="ePar">   The ID of the parameter. </param>
			/// <param name="auValue"> [out] The value of the parameter. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxGetPar(Rx::LFR::Params::ECudaCompute::ID ePar, Rx::CRxArrayUInt& auValue);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Gets the value of a parameter.
			/// </summary>
			///
			/// <param name="ePar">   The ID of the parameter. </param>
			/// <param name="adValue"> [out] The value of the parameter. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxGetPar(Rx::LFR::Params::ECudaCompute::ID ePar, Rx::CRxArrayDouble& adValue);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Gets the value of a parameter.
			/// </summary>
			///
			/// <param name="ePar">   The ID of the parameter. </param>
			/// <param name="asValue"> [out] The value of the parameter. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxGetPar(Rx::LFR::Params::ECudaCompute::ID ePar, Rx::CRxArrayString& asValue);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Get the value range of a parameter.
			/// </summary>
			///
			/// <param name="ePar">   The ID of the parameter. </param>
			/// <param name="uMin"> [out] The min allowed value of the parameter. </param>
			/// <param name="uMax"> [out] The max allowed value of the parameter. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxGetParRange(Rx::LFR::Params::ECudaCompute::ID ePar, unsigned& uMin, unsigned& uMax);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Get the value range of a parameter.
			/// </summary>
			///
			/// <param name="ePar">   The ID of the parameter. </param>
			/// <param name="dMin"> [out] The min allowed value of the parameter. </param>
			/// <param name="dMax"> [out] The max allowed value of the parameter. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxGetParRange(Rx::LFR::Params::ECudaCompute::ID ePar, double& dMin, double& dMax);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Get the value range of an array parameter and the min and max allowed number of elements in the array.
			/// </summary>
			///
			/// <param name="ePar">   The ID of the parameter. </param>
			/// <param name="iMinCount"> [out] The min number of values allowed in the array. </param>
			/// <param name="iMaxCount"> [out] The max number of values allowed in the array. </param>
			/// <param name="uMin"> [out] The min allowed value of the parameter. </param>
			/// <param name="uMax"> [out] The max allowed value of the parameter. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxGetParRange(Rx::LFR::Params::ECudaCompute::ID ePar, size_t& iMinCount, size_t& iMaxCount, unsigned& uMin, unsigned& uMax);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Get the value range of an array parameter and the min and max allowed number of elements in the array.
			/// </summary>
			///
			/// <param name="ePar">   The ID of the parameter. </param>
			/// <param name="iMinCount"> [out] The min number of values allowed in the array. </param>
			/// <param name="iMaxCount"> [out] The max number of values allowed in the array. </param>
			/// <param name="dMin"> [out] The min allowed value of the parameter. </param>
			/// <param name="dMax"> [out] The max allowed value of the parameter. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxGetParRange(Rx::LFR::Params::ECudaCompute::ID ePar, size_t& iMinCount, size_t& iMaxCount, double& dMin, double& dMax);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Get the string representation of a parameter.
			/// </summary>
			///
			/// <param name="ePar">   The parameter ID. </param>
			/// <param name="sValue"> [out] On return contains the parameter string representation. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxGetParName(Rx::LFR::Params::ECudaCompute::ID ePar, Rx::CRxString& sValue);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Get the Properties of a parameter.
			/// </summary>
			///
			/// <param name="ePar">			  The parameter ID. </param>
			/// <param name="sValue">		  [out] On return contains the parameter string representation. </param>
			/// <param name="bReadAccess">    [out] On return contains the parameter ReadAccess flag. </param>
			/// <param name="bWriteAccess">   [out] On return contains the parameter WriteAccess flag. </param>
			/// <param name="eParameterType"> [out] On return contains the parameter DataType. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxGetParProperties(Rx::LFR::Params::ECudaCompute::ID ePar, Rx::CRxString& sValue, bool& bReadAccess, bool& bWriteAccess, EValueType::ID& eParameterType);

		public:

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Sets the value of a parameter.
			/// </summary>
			///
			/// <param name="ePar">   The ID of the parameter. </param>
			/// <param name="uValue"> [in] The value of the parameter. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxSetPar(Rx::LFR::Params::ECalib::ID ePar, unsigned uValue);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Sets the value of a parameter.
			/// </summary>
			///
			/// <param name="ePar">   The ID of the parameter. </param>
			/// <param name="dValue"> [in] The value of the parameter. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxSetPar(Rx::LFR::Params::ECalib::ID ePar, double dValue);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Sets the value of a parameter.
			/// </summary>
			///
			/// <param name="ePar">   The ID of the parameter. </param>
			/// <param name="sValue"> [in] The value of the parameter. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxSetPar(Rx::LFR::Params::ECalib::ID ePar, const Rx::CRxString& sValue);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Sets the value of a parameter.
			/// </summary>
			///
			/// <param name="ePar">   The ID of the parameter. </param>
			/// <param name="auValue"> [in] The value of the parameter. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxSetPar(Rx::LFR::Params::ECalib::ID ePar, const Rx::CRxArrayUInt& auValue);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Sets the value of a parameter.
			/// </summary>
			///
			/// <param name="ePar">   The ID of the parameter. </param>
			/// <param name="adValue"> [in] The value of the parameter. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxSetPar(Rx::LFR::Params::ECalib::ID ePar, const Rx::CRxArrayDouble& adValue);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Sets the value of a parameter.
			/// </summary>
			///
			/// <param name="ePar">    The ID of the parameter. </param>
			/// <param name="asValue"> [in] The value of the parameter. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxSetPar(Rx::LFR::Params::ECalib::ID ePar, const Rx::CRxArrayString& asValue);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Gets the value of a parameter.
			/// </summary>
			///
			/// <param name="ePar">   The ID of the parameter. </param>
			/// <param name="uValue"> [out] The value of the parameter. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxGetPar(Rx::LFR::Params::ECalib::ID ePar, unsigned& uValue);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Gets the value of a parameter.
			/// </summary>
			///
			/// <param name="ePar">   The ID of the parameter. </param>
			/// <param name="dValue"> [out] The value of the parameter. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxGetPar(Rx::LFR::Params::ECalib::ID ePar, double& dValue);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Gets the value of a parameter.
			/// </summary>
			///
			/// <param name="ePar">   The ID of the parameter. </param>
			/// <param name="sValue"> [out] The value of the parameter. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxGetPar(Rx::LFR::Params::ECalib::ID ePar, Rx::CRxString& sValue);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Gets the value of a parameter.
			/// </summary>
			///
			/// <param name="ePar">   The ID of the parameter. </param>
			/// <param name="auValue"> [out] The value of the parameter. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxGetPar(Rx::LFR::Params::ECalib::ID ePar, Rx::CRxArrayUInt& auValue);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Gets the value of a parameter.
			/// </summary>
			///
			/// <param name="ePar">   The ID of the parameter. </param>
			/// <param name="adValue"> [out] The value of the parameter. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxGetPar(Rx::LFR::Params::ECalib::ID ePar, Rx::CRxArrayDouble& adValue);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Gets the value of a parameter.
			/// </summary>
			///
			/// <param name="ePar">   The ID of the parameter. </param>
			/// <param name="asValue"> [out] The value of the parameter. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxGetPar(Rx::LFR::Params::ECalib::ID ePar, Rx::CRxArrayString& asValue);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Get the value range of a parameter.
			/// </summary>
			///
			/// <param name="ePar">   The ID of the parameter. </param>
			/// <param name="uMin"> [out] The min allowed value of the parameter. </param>
			/// <param name="uMax"> [out] The max allowed value of the parameter. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxGetParRange(Rx::LFR::Params::ECalib::ID ePar, unsigned& uMin, unsigned& uMax);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Get the value range of a parameter.
			/// </summary>
			///
			/// <param name="ePar">   The ID of the parameter. </param>
			/// <param name="dMin"> [out] The min allowed value of the parameter. </param>
			/// <param name="dMax"> [out] The max allowed value of the parameter. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxGetParRange(Rx::LFR::Params::ECalib::ID ePar, double& dMin, double& dMax);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Get the value range of an array parameter and the min and max allowed number of elements in the array.
			/// </summary>
			///
			/// <param name="ePar">   The ID of the parameter. </param>
			/// <param name="iMinCount"> [out] The min number of values allowed in the array. </param>
			/// <param name="iMaxCount"> [out] The max number of values allowed in the array. </param>
			/// <param name="uMin"> [out] The min allowed value of the parameter. </param>
			/// <param name="uMax"> [out] The max allowed value of the parameter. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxGetParRange(Rx::LFR::Params::ECalib::ID ePar, size_t& iMinCount, size_t& iMaxCount, unsigned& uMin, unsigned& uMax);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Get the value range of an array parameter and the min and max allowed number of elements in the array.
			/// </summary>
			///
			/// <param name="ePar">   The ID of the parameter. </param>
			/// <param name="iMinCount"> [out] The min number of values allowed in the array. </param>
			/// <param name="iMaxCount"> [out] The max number of values allowed in the array. </param>
			/// <param name="dMin"> [out] The min allowed value of the parameter. </param>
			/// <param name="dMax"> [out] The max allowed value of the parameter. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxGetParRange(Rx::LFR::Params::ECalib::ID ePar, size_t& iMinCount, size_t& iMaxCount, double& dMin, double& dMax);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Get the string representation of a parameter.
			/// </summary>
			///
			/// <param name="ePar">   The parameter ID. </param>
			/// <param name="sValue"> [out] On return contains the parameter string representation. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxGetParName(Rx::LFR::Params::ECalib::ID ePar, Rx::CRxString& sValue);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Get the Properties of a parameter.
			/// </summary>
			///
			/// <param name="ePar">			  The parameter ID. </param>
			/// <param name="sValue">		  [out] On return contains the parameter string representation. </param>
			/// <param name="bReadAccess">    [out] On return contains the parameter ReadAccess flag. </param>
			/// <param name="bWriteAccess">   [out] On return contains the parameter WriteAccess flag. </param>
			/// <param name="eParameterType"> [out] On return contains the parameter DataType. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxGetParProperties(Rx::LFR::Params::ECalib::ID ePar, Rx::CRxString& sValue, bool& bReadAccess, bool& bWriteAccess, EValueType::ID& eParameterType);

		public:

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Saves all writable API parameter to file. Its mandatory to bind a light field image before.
			/// </summary>
			///
			/// <param name="sxFilename"> The filename. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxSaveParameter(const Rx::CRxString& sxFilename);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Loads all writable API parameter from file. Its mandatory to bind a light field image before.
			/// </summary>
			///
			/// <param name="sxFilename"> The filename. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxLoadParameter(const Rx::CRxString& sxFilename);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Resets all parameters to their default value.
			/// </summary>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxResetParameters();

		public:

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Convert a Rx::CRxImage to a new pixel and data type.
			/// </summary>
			///
			/// <param name="xDstImage">	 [out] Destination image. </param>
			/// <param name="xSrcImage">	 Reference to the image. </param>
			/// <param name="eDstPixelType"> Pixel type of the converted image. </param>
			/// <param name="eDstDataType">  Data type of the converted image. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxConvertImage(Rx::CRxImage& xDstImage,
					const Rx::CRxImage& xSrcImage,
					Rx::Interop::Runtime28::EPixelType::ID eDstPixelType,
					Rx::Interop::Runtime28::EDataType::ID eDstDataType);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Convert a Rx::CRxImage to a new pixel and data type.
			/// </summary>
			///
			/// <param name="pDstImage">	 [out] Destination image. </param>
			/// <param name="pSrcImage">	 Reference to the image. </param>
			/// <param name="eDstPixelType"> Pixel type of the converted image. </param>
			/// <param name="eDstDataType">  Data type of the converted image. </param>
			/// <param name="bCreate">		 if true, memory for the destination image is created by this function. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxConvertImage(Rx::Interop::Runtime28::IImage* pDstImage,
					const Rx::Interop::Runtime28::IImage* pSrcImage,
					Rx::Interop::Runtime28::EPixelType::ID eDstPixelType,
					Rx::Interop::Runtime28::EDataType::ID eDstDataType,
					bool bCreate);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Get an internal image.
			///
			/// 	The available internal image IDs are listed in Rx::LFR::CApiLF::EImgID.
			/// </summary>
			///
			/// <param name="eImgID"> Internal image ID. This is <b>not</b> a ray image handle. </param>
			/// <param name="xImage"> [out] On return contains a copy of the specified internal image. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxGetImage(LFR::EImage::ID eImgID, Rx::CRxImage& xImage);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Get an internal image.
			///
			/// 	The available internal image IDs are listed in Rx::LFR::CApiLF::EImgID.
			/// </summary>
			///
			/// <param name="eImgID">  Internal image ID. This is <b>not</b> a ray image handle. </param>
			/// <param name="pImage">  [out] On return contains a copy of the specified internal image. </param>
			/// <param name="bCreate"> If true, a new image is created in pImage. Otherwise, it is ensured that pImage refers to an image
			/// 					   the same size and type as the respective internal image, and then the internal image is copied. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxGetImage(LFR::EImage::ID eImgID, Rx::Interop::Runtime28::IImage* pImage, bool bCreate);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Set an internal image.
			///
			/// 	The available internal image IDs are listed in Rx::LFR::CApiLF::EImgID.
			///
			/// 	A new ray image can be set with eImgID set to LFR::EImage::Raw and a new gray image with LFR::EImage::Gray.
			/// 	RxSetImage copies the image data into the currently bound ray image and to the CUDA device. For the new ray image to be
			/// 	used in calculations you must call Rx::LFR::CApiLF::RxPreProcess after setting the ray and the gray image.
			///
			/// 	You can also circumvent the internal preprocessing of the ray image by writing directly the processed ray image to the
			/// 	CUDA device with  LFR::EImage::Processed_Normalized. However, this will not change the LFR::EImage::Raw or
			/// 	LFR::EImage::Gray images currently bound.
			/// </summary>
			///
			/// <param name="eImgID"> Internal image ID. This is <b>not</b> a ray image handle. </param>
			/// <param name="xImage"> The image to copy into the specified internal image. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxSetImage(LFR::EImage::ID eImgID, const Rx::CRxImage& xImage);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Set an internal image.
			///
			/// 	The available internal image IDs are listed in Rx::LFR::CApiLF::EImgID.
			///
			/// 	A new ray image can be set with eImgID set to LFR::EImage::Raw and a new gray image with
			/// 	LFR::EImage::Gray. RxSetImage copies the image data into the currently bound ray image and to the CUDA
			/// 	device.
			/// 	For the new ray image to be used in calculations you must call Rx::LFR::CApiLF::RxPreProcess after setting the ray and the
			/// 	gray image.
			///
			/// 	You can also circumvent the internal preprocessing of the ray image by writing directly the processed ray image to the
			/// 	CUDA device with LFR::EImage::Processed_Normalized. However, this will not change the
			/// 	LFR::EImage::Raw or LFR::EImage::Gray images currently bound.
			/// </summary>
			///
			/// <param name="eImgID"> Internal image ID. This is <b>not</b> a ray image handle. </param>
			/// <param name="pImage"> The image to copy into the specified internal image. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxSetImage(LFR::EImage::ID eImgID, const Rx::Interop::Runtime28::IImage* pImage);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Test whether an internal image is valid.
			/// </summary>
			///
			/// <attention> The available internal image IDs are listed in Rx::LFR::CApiLF::EImgID. </attention>
			///
			/// <param name="eImgID"> Internal image ID. This is <b>not</b> a ray image handle. </param>
			///
			/// <returns> <c>true</c> if the image is valid, <c>false</c> otherwise. </returns>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static bool RxIsImageValid(LFR::EImage::ID eImgID);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Frees memory used by the image defined in <c>eImgID</c>. This invalidates the image.
			/// </summary>
			///
			/// <param name="eImgID"> The image ID. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxFreeImage(LFR::EImage::ID eImgID);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Get the image format of an internal image.
			/// </summary>
			///
			/// <attention>
			/// 	This function returns the image format of an internal image without copying the actual image from the CUDA device to
			/// 	host memory.
			/// 	The available internal image IDs are listed in Rx::LFR::CApiLF::EImgID.
			/// </attention>
			///
			/// <param name="eImgID"> Internal image ID. This is <b>not</b> a ray image handle. </param>
			/// <param name="xF">	  [out] On return contains the internal image's format. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxGetImageFormat(LFR::EImage::ID eImgID, Rx::CRxImageFormat& xF);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Get the device pointer of an internal image.
			/// </summary>
			///
			/// <attention>
			/// 	This function returns the image device pointer of an internal image. The available internal image IDs are listed in
			/// 	Rx::LFR::CApiLF::EImgID.
			/// </attention>
			///
			/// <param name="eImgID">	  Internal image ID. This is <b>not</b> a ray image handle. </param>
			/// <param name="pDevicePtr"> [out] On return contains the internal image's device pointer. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxGetImageDevicePointer(LFR::EImage::ID eImgID, void*& pDevicePtr);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Gets device pointer pitch, which is the width in bytes of the allocation. Given a row and column of an array element of
			/// 	type T, the address is computed as:
			///
			/// 	T* pElement = (T*)((char*)BaseAddress + Row * pitch) + Column;
			/// </summary>
			///
			/// <param name="eImgID"> Internal image ID. This is <b>not</b> a ray image handle. </param>
			///
			/// <returns> The image device pointer pitch. </returns>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static size_t RxGetImageDevicePointerPitch(LFR::EImage::ID eImgID);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Resize an image.
			/// </summary>
			///
			/// <param name="xDstImage"> [out] The target image to store the result. </param>
			/// <param name="xSrcImage"> [in] The image that is to be resized. </param>
			/// <param name="iDivider">  [in] The image size divider. For example, if iDivder = 2, then the resultant image size is half the
			/// 						 original size. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxResizeImage(Rx::Interop::Runtime28::IImage* xDstImage, Rx::Interop::Runtime28::IImage* xSrcImage, int iDivider);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Finds the minimum and maximum value of the given eImgID
			/// </summary>
			///
			/// <param name="eImgID">   The image ID. </param>
			/// <param name="uChannel"> The channel. </param>
			/// <param name="fMin">	    [out] The minimum value. </param>
			/// <param name="fMax">	    [out] The maximum value. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxGetImageMinMax(LFR::EImage::ID eImgID, unsigned uChannel, float& fMin, float& fMax);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Calculates the histogram of the image with the given eImgID and stores the histogram data in the given array.
			/// 	This array must be large enough to hold 4 * 256 numbers. The number of calculated channels is returned in uChannels.
			/// </summary>
			///
			/// <param name="eImgID">	  The image ID. </param>
			/// <param name="xHistogram"> [out] A reference of Rx::CRxArrayUInt where the histogram will be stored. </param>
			/// <param name="uChannels">  [out] The number of channels. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxGetImageHistogram(LFR::EImage::ID eImgID, Rx::CRxArrayUInt& xHistogram, unsigned& uChannels);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Projects an array of points from the given source space into the given target space.
			/// </summary>
			///
			/// <param name="adTrgPoints"> [out] The array of projected points. </param>
			/// <param name="adSrcPoints"> The array of points to project. </param>
			/// <param name="eTrgSpace">   The target space. </param>
			/// <param name="eSrcSpace">   The source space. </param>
			///
			/// <returns>
			/// 	True if all projections succeeded, false if at least one projection failed (out of sensor or image projection).
			/// </returns>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static bool RxProject(Rx::CRxArrayDouble& adTrgPoints, const Rx::CRxArrayDouble& adSrcPoints, LF::ESpace::ID eTrgSpace, LF::ESpace::ID eSrcSpace);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Projects the given source depth value into the given target space.
			/// </summary>
			///
			/// <param name="dSrcDepth"> The source depth in millimeter or virtual depths. </param>
			/// <param name="eSrcSpace"> The source space. </param>
			/// <param name="bSrcVD">    True if the source depth is given in virtual depths. Is ignored if the source space isn't virtual. </param>
			/// <param name="eTrgSpace"> The target space. </param>
			/// <param name="bTrgVD">    True if the target depth should be given in virtual depths. Is ignored if the target space isn't virtual. </param>
			///
			/// <returns> The resultant target depth in millimeter or virtual depths. </returns>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static double RxProjectDepth(double dSrcDepth, LF::ESpace::ID eSrcSpace, bool bSrcVD, LF::ESpace::ID eTrgSpace, bool bTrgVD);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Locks the CUDA Mutex.
			/// </summary>
			///
			/// <param name="iTimeout"> If the mutex is locked, the timeout defines the time in ms until a Rx::CRxException is
			/// 						thrown. </param>
			///
			/// <returns> True if it succeeds, false if it fails. </returns>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static bool RxLockCudaMutex(int iTimeout);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Unlocks the CUDA Mutex.
			/// </summary>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxUnlockCudaMutex();

		public:

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Automatically calibrates MLI grid.
			/// </summary>
			///
			/// <returns> Returns false if estimation has been failed because of wrong exposure or aperture configuration. </returns>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static bool RxGridCalibrateMli();

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Automatically calibrates MLA grid. Requires master dongle feature.
			/// </summary>
			///
			/// <returns> Returns false if estimation has been failed because of wrong exposure or aperture configuration. </returns>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static bool RxGridCalibrateMla();

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Automatically calibrates the MLA rotation steps and the MLA reflection. Requires master dongle feature.
			/// </summary>
			///
			/// <returns> Returns false if estimation has been failed because of wrong exposure or aperture configuration. </returns>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static bool RxGridCalibrateMaster();

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Enables or disables a callback during automatic grid calibration via RxGridCalibrateMli, RxGridCalibrateMla and
			/// 	RxGridCalibrateMaster.
			/// </summary>
			///
			/// <param name="bEnable"> True to enable, false to disable. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxGridEnableCalibrationCallback(bool bEnable);

		public:

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Pre-Process a ray image.
			/// </summary>
			///
			/// <remarks>
			/// 	The ray image that is bound with RxRayBind() is a raw lightfield image. Before this ray image can be used by the actual
			/// 	processing algorithms, it has to be adjusted by applying a rectification of a possible radial distortion and by
			/// 	adjusting its brightness and color with respect to a gray image.
			/// </remarks>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxPreProcess();

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Pre Process a ray image with a minimal Set of preprocessing parameter.
			///
			/// 	This function does the same preprocessing as Rx::LFR::CApiLF::RxPreProcess but all preprocessing flags with exception of
			/// 	debayering are deactivated.
			/// </summary>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxGridDataImage();

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Show a lens grid overlay on the raw ray image.
			///
			/// 	The result is written to the internal image with ID LFR::EImage::Grid.
			/// </summary>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxGrid();

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Focus image to a plane perpendicular to the optical axis, i.e. parallel to the image plane.
			///
			/// 	This focuses to a plane perpendicular to the optical axis. To change the focal plane, use parameter
			/// 	Rx::LFR::Params::EApiLF::Focus_RelativeFocusPlane. A relative focus value of zero refocuses to the plane furthest away from the
			/// 	viewer and a value of 1 would focus to a plane that passes through the object side focal point of the recording lens.
			///
			/// 	The result is written to the internal image with ID LFR::EImage::RefocusBasic. The size of this resultant image is set
			/// 	in relation to the ray image size via the parameter Rx::LFR::Params::EApiLF::Focus_ImageDivisor.
			/// </summary>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxRefocusBasic();

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Focus on a depth surface.
			///
			/// 	In principle, each pixel of the result image can be focused individually. The function Rx::LFR::CApiLF::RxTotalFocus
			/// 	makes this property available by focusing the ray image to the depth surface given in the internal depth image related
			/// 	to the target space that is selected. To calculate the depth image you have to call Rx::LFR::CApiLF::RxDepthRay first
			/// 	and next Rx::LFR::CApiLF::RxDepthMap, or by a user defined image set with Rx::LFR::CApiLF::RxSetImage.
			///
			/// 	When setting a depth image with Rx::LFR::CApiLF::RxSetImage it need not have the same dimensions as the resultant
			/// 	image. The given depth map is implicitly scaled to the size of the resultant refocused image.
			///
			/// 	If the size of the given depth map image is 1x1 pixel, the depth encoded for that pixel is applied to all focused
			/// 	pixel. The depth image has to be of pixel type Rx::Interop::Runtime28::EPixelType::Lum and data type
			/// 	Rx::Interop::Runtime28::EDataType::UByte. The pixel value range of [0,255] is mapped to [0,1] for the interpretation as
			/// 	depth.
			///
			/// 	\attention The result is written to the internal image related to the given space. The size of this resultant image is
			/// 	set in relation to the ray image size via the parameter Rx::LFR::Params::EApiLF::Focus_ImageDivisor.
			/// </summary>
			///
			/// <param name="eSpace"> The space. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxTotalFocus(Rx::LF::ESpace::ID eSpace);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Creates a multi view image and stores the result in the image with the ID LFR::EImage::Multiview_ViewCamera.
			/// </summary>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxMultiview();

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Estimates the depth of the bound ray image and stores the result in the image with the ID LFR::EImage::DepthRay.
			/// </summary>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxDepthRay();

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Creates a depth map from the ray depth image created by Rx::LFR::CApiLF::RxDepthRay.
			/// </summary>
			///
			/// <param name="eSpace"> The space. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxDepthMap(Rx::LF::ESpace::ID eSpace);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Object space depth 3D.
			///
			/// 	This creates a RGBA float image which maps each pixel in the view camera to a 3D position in object space. The R
			/// 	channel is the X coordinate, the G channel is the Y coordinate and the B channel is the Z coordinate. The Z coordinate
			/// 	is relative to the global coordinate system which typically coincides with the light field camera sensor. All
			/// 	coordinate values are given in millimeters.
			///
			/// 	The image is stored in the image with the ID LFR::EImage::Depth3D.
			/// </summary>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxDepth3D();

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Colorizes the depth map created by Rx::LFR::CApiLF::RxDepthMap.The result is stored in the image with the ID
			/// 	LFR::EImage::Depth3D.
			/// </summary>
			///
			/// <param name="eSpace"> The space. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxDepthColorCode(Rx::LF::ESpace::ID eSpace);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Saves the 3D mesh provided by image 'Depth3D' to binary STL format. This requires a valid image computed by
			/// 	Rx::LFR::CApiLF::RxDepth3D. Triangles with a depth-variation larger than 'dMaxEdgeLength' for at least one vertex pair are
			/// 	not added to the mesh.
			/// </summary>
			///
			/// <param name="sxFilename">	  The complete file path. </param>
			/// <param name="bUseVD">		  True to save the mesh in virtual depth units instead of metric units. </param>
			/// <param name="dMaxEdgeLength"> (Optional) Limit for depth-variation in vertices. -1 = infinity. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxSaveDepth3dMesh(const Rx::CRxString& sxFilename, bool bUseVD, const double dMaxEdgeLength = -1.0);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Saves the 3D mesh provided by image 'Depth3D' to binary STL format. This requires a valid image computed by
			/// 	Rx::LFR::CApiLF::RxDepth3D. Triangles with a depth-variation larger than 'dMaxEdgeLength' for at least one vertex pair are
			/// 	not added to the mesh.
			/// </summary>
			///
			/// <param name="sxFilename">	   The complete file path. </param>
			/// <param name="bUseVD">		   True to save the mesh in virtual depth uni
			///                                ts instead of metric units. </param>
			/// <param name="dMaxEdgeLength">  Limit for depth-variation in vertices. -1 = infinity. </param>
			/// <param name="dCropLeftPerc">   the percentage of the cropping on the left side. </param>
			/// <param name="dCropRightPerc">  the percentage of the cropping on the right side. </param>
			/// <param name="dCropTopPerc">    the percentage of the cropping on the top side. </param>
			/// <param name="dCropBottomPerc"> the percentage of the cropping on the bottom side. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxSaveDepth3dMesh(const Rx::CRxString& sxFilename, bool bUseVD,
					const double dMaxEdgeLength,
					const double dCropLeftPerc,
					const double dCropRightPerc,
					const double dCropTopPerc,
					const double dCropBottomPerc);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Saves the depth values of the current Depth3D image to the given file as a point list.
			///
			/// 	The formats available are:
			///
			/// 	ASCII:
			/// 	- .txt -- one point per row as plain text (default when no other extension matches, .txt is appended to filename)
			/// 	- .xyz -- conform to the 'xyz' file standard (augments txt format with small header)
			///
			/// 	Binary:
			/// 	- .pcd -- the 'Point Cloud Data' format, see http://pointclouds.org/documentation/tutorials/pcd_file_format.php.
			/// </summary>
			///
			/// <param name="sxFilename"> The complete file path. </param>
			/// <param name="bUseVD">	  True to save the point list in virtual depth units instead of metric units. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxSaveDepth3dPointList(const Rx::CRxString& sxFilename, bool bUseVD);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Saves the depth values of the current Depth3D image to the given file as a point list.
			///
			/// 	The formats available are:
			///
			/// 	ASCII:
			/// 	- .txt -- one point per row as plain text (default when no other extension matches, .txt is appended to filename)
			/// 	- .xyz -- conform to the 'xyz' file standard (augments txt format with small header)
			///
			/// 	Binary:
			/// 	- .pcd -- the 'Point Cloud Data' format, see http://pointclouds.org/documentation/tutorials/pcd_file_format.php.
			/// </summary>
			///
			/// <param name="sxFilename">	   The complete file path. </param>
			/// <param name="bUseVD">		   True to save the point list in virtual depth units instead of metric units. </param>
			/// <param name="dCropLeftPerc">   The crop left perc. </param>
			/// <param name="dCropRightPerc">  The crop right perc. </param>
			/// <param name="dCropTopPerc">    The crop top perc. </param>
			/// <param name="dCropBottomPerc"> The crop bottom perc. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxSaveDepth3dPointList(const Rx::CRxString& sxFilename, bool bUseVD,
					const double dCropLeftPerc,
					const double dCropRightPerc,
					const double dCropTopPerc,
					const double dCropBottomPerc);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Sets the computation filter mask image.
			///
			/// 	This image is used to reduce the number of lenses used for depth estimation (Rx::LFR::CApiLF::RxDepthRay).
			///
			/// 	It must have the same dimension as the raw image and a pixel type of Rx::Interop::Runtime28::EPixelType::Lum and a data
			/// 	type of Rx::Interop::Runtime28::EDataType::UByte.
			///
			/// 	Each lens of the raw image has a lens center that can be rounded to a pixel. If this pixel has the value 255 in the
			/// 	filter mask image, the corresponding lens is used. If this pixel has another value, the lens is not used.
			/// </summary>
			///
			/// <param name="xImage"> The computation filter mask image. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxSetComputationFilterMask(const Rx::CRxImage& xImage);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Sets the computation filter mask image.
			///
			/// 	This image is used to reduce the number of lenses used for depth estimation (Rx::LFR::CApiLF::RxDepthRay).
			///
			/// 	It must have the same dimension as the raw image and a pixel type of Rx::Interop::Runtime28::EPixelType::Lum and a data
			/// 	type of Rx::Interop::Runtime28::EDataType::UByte.
			///
			/// 	Each lens of the raw image has a lens center that can be rounded to a pixel. If this pixel has the value 255 in the
			/// 	filter mask image, the corresponding lens is used. If this pixel has another value, the lens is not used.
			/// </summary>
			///
			/// <param name="sxFilename"> The complete file path of the computation filter mask image to load. </param>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxSetComputationFilterMask(const Rx::CRxString& sxFilename);

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			/// <summary>
			/// 	Removes the computation filter mask image set by Rx::LFR::CApiLF::RxSetComputationFilterMask.
			/// </summary>
			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			static void RxRemoveComputationFilterMask();

		private:

			static CApiLF_Impl* sm_pxImpl;

		private:

			/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
			CApiLF();	// Forbidden
			~CApiLF();	// Forbidden
			CApiLF(const CApiLF&);	// Forbidden
			CApiLF& operator=(const CApiLF&);	// Forbidden
		};
	}
}
