Raytrix Light Field SDK  5.0
Rx::LFR::CCalibrationManager Class Reference

Detailed Description

Provides methods for managing camera calibrations. This includes creating, loading and saving.

Inherits Rx::LFR::CPimpl< CCalibrationManager_Impl, Interfaces::ECalibManager::ID >.

Public Member Functions

CCalibrationManager_Impl & GetImpl ()
 Gets the non constant implementation. More...
 
const CCalibrationManager_Impl & GetImpl () const
 Gets the constant implementation. More...
 
const void * GetInterface (Interfaces::ECalibManager::ID eInterface) const
 Gets the interface defined by the given interface ID. More...
 
bool HasInterface (Interfaces::ECalibManager::ID eInterface)
 Queries if this object has the given interface. More...
 

Static Public Member Functions

static CRxString CreateCalibration (const CCamera &xCamera)
 Creates a new calibration and assigns it to the given camera. More...
 
static CRxString CreateCalibration (const CRxString &sxCamHardwareID)
 Creates a new calibration and assigns it to the given camera (defined by hardware ID). More...
 
static CRxString CreateCalibration (const CRxString &sxCamType, const CRxString &sxCamSerial)
 Creates a new calibration and assigns it to the given camera (defined by type and serial). More...
 
static void CreateDatabase (const CCamera &xCamera, bool bForce)
 Creates a calibration database for the given camera. More...
 
static void CreateDatabase (const CRxString &sxCamHardwareID, bool bForce)
 Creates a calibration database for the given camera (defined by hardware ID). More...
 
static void CreateDatabase (const CRxString &sxCamType, const CRxString &sxCamSerial, bool bForce)
 Creates a calibration database for the given camera (defined by type and serial). More...
 
static void DeleteCalibration (const CRxString &sxGUID)
 Deletes the calibration with the given GUID. More...
 
static void GetCalibrationGUIDs (CRxArrayString &asxGUIDs)
 Gets an array with GUIDs of all calibrations. More...
 
static void GetCalibrationGUIDs (CRxArrayString &asxGUIDs, const CCamera &xCamera)
 Gets an array with GUIDs of all calibrations of the given camera. More...
 
static CRxString GetCameraName (const CCamera &xCamera)
 Gets the Raytrix name of the given camera. More...
 
static CRxString GetCameraSerial (const CCamera &xCamera)
 Gets the Raytrix serial of the given camera. More...
 
static CRxString GetDefaultCalibrationGUID (const CCamera &xCamera)
 Gets the GUID of the default calibration of the given camera. More...
 
static CRxString GetDefaultCalibrationGUID (const CRxString &sxSerial, const CRxString &sxDriver)
 Gets the GUID of the default calibration of the given camera defined by the camera serial and the driver name. More...
 
static void * GetInterface (Interfaces::ECalibManager::ID eData)
 Gets the interface defined by ECalibrationManagerInterface. More...
 
static CRxString GetMasterCalibrationGUID (const CCamera &xCamera)
 Gets the GUID of the master calibration of the given camera. More...
 
static CRxString GetMasterCalibrationGUID (const CRxString &sxSerial, const CRxString &sxDriver)
 Gets the GUID of the master calibration of the given camera defined by the camera serial and the driver name. More...
 
static void GetMasterCalibrationGUIDs (CRxArrayString &asxGUIDs)
 Gets an array with GUIDs of all master calibrations. Each camera has a single master calibration. More...
 
static void GetMetaData (CRxCalibMetaData &xData, const CRxString &sxGUID)
 Gets the calibration meta data of the given calibration. More...
 
static bool HasDatabase (const CCamera &xCamera)
 Queries if the there is a calibration database for the given camera. More...
 
static void Initialize ()
 Initializes this calibration manager and reads all calibrations from disk. More...
 
static void Initialize (const CRxString &sxFolder)
 Initializes this calibration manager and reads all calibrations from disk. More...
 
static void LoadCalibration (CCalibration &xCalib, const CRxString &sxGUID, bool bLoadGrayImg)
 Loads the calibration with the given GUID. More...
 
static void LoadDefaultCalibration (CCalibration &xCalib, const CCamera &xCamera, bool bLoadGrayImg)
 Loads the default calibration of the given camera. More...
 
static void LoadDefaultCalibration (CCalibration &xCalib, const CRxString &sCameraSerial, const CRxString &sDriverName, bool bLoadGrayImg)
 Loads the default calibration of the given camera defined by the camera serial and the driver name. More...
 
static void PatchCalibration (const CRxString &sxGUID)
 Patch the calibration given by its GUID, by overwriting required values to valid ones. More...
 
static void SaveCalibration (const CCalibration &xCalib, const CRxString &sxGUID, bool bSaveGrayImg)
 Saves the given calibration to disk. More...
 
static void SetCameraName (const CCamera &xCamera, const CRxString &sxName)
 Sets the Raytrix name of the given camera. Requires Dongle::ERuntimeFeature::Master. More...
 
static void SetCameraSerial (const CCamera &xCamera, const CRxString &sxSerial)
 Sets the Raytrix serial of the given camera. Requires Dongle::ERuntimeFeature::Master. More...
 
static void SetMetaData (const CRxCalibMetaData &xData, const CRxString &sxGUID)
 Sets the calibration meta data of the given calibration. Trying to set the meta data of the master calibration will throw an exception, as the master calibration cannot be set. More...
 

Member Function Documentation

◆ CreateCalibration() [1/3]

static CRxString Rx::LFR::CCalibrationManager::CreateCalibration ( const CCamera xCamera)
static

Creates a new calibration and assigns it to the given camera.

Requires Dongle::ERuntimeFeature::Save to save this change permanently.

Parameters
xCamera[in] The camera.
Returns
The GUID of the created calibration.

◆ CreateCalibration() [2/3]

static CRxString Rx::LFR::CCalibrationManager::CreateCalibration ( const CRxString sxCamHardwareID)
static

Creates a new calibration and assigns it to the given camera (defined by hardware ID).

Requires Dongle::ERuntimeFeature::Save to save this change permanently.

Parameters
sxCamHardwareID[in] The camera hardware ID. For example 'TypeA_012' for type A cameras with serial 012.
Returns
The GUID of the created calibration.

◆ CreateCalibration() [3/3]

static CRxString Rx::LFR::CCalibrationManager::CreateCalibration ( const CRxString sxCamType,
const CRxString sxCamSerial 
)
static

Creates a new calibration and assigns it to the given camera (defined by type and serial).

Requires Dongle::ERuntimeFeature::Save to save this change permanently.

Parameters
sxCamType[in] The camera type. For example 'TypeA' for type A cameras.
sxCamSerial[in] The camera serial.
Returns
The GUID of the created calibration.

◆ CreateDatabase() [1/3]

static void Rx::LFR::CCalibrationManager::CreateDatabase ( const CCamera xCamera,
bool  bForce 
)
static

Creates a calibration database for the given camera.

Requires Dongle::ERuntimeFeature::Master.

Parameters
xCamera[in] The camera.
bForce[in] True to enforce the creation even if the calibration already exists. Otherwise an exception is thrown in that case.

◆ CreateDatabase() [2/3]

static void Rx::LFR::CCalibrationManager::CreateDatabase ( const CRxString sxCamHardwareID,
bool  bForce 
)
static

Creates a calibration database for the given camera (defined by hardware ID).

Requires Dongle::ERuntimeFeature::Master.

Parameters
sxCamHardwareID[in] The camera hardware ID. For example 'TypeA_012' for type A cameras with serial 012.
bForce[in] True to enforce the creation even if the calibration already exists. Otherwise an exception is thrown.

◆ CreateDatabase() [3/3]

static void Rx::LFR::CCalibrationManager::CreateDatabase ( const CRxString sxCamType,
const CRxString sxCamSerial,
bool  bForce 
)
static

Creates a calibration database for the given camera (defined by type and serial).

Requires Dongle::ERuntimeFeature::Master.

Parameters
sxCamType[in] The camera type. For example 'TypeA' for type A cameras.
sxCamSerial[in] The camera serial.
bForce[in] True to enforce the creation even if the calibration already exists. Otherwise an exception is thrown in that case.

◆ DeleteCalibration()

static void Rx::LFR::CCalibrationManager::DeleteCalibration ( const CRxString sxGUID)
static

Deletes the calibration with the given GUID.

Requires Dongle::ERuntimeFeature::Save to save this change permanently.

Parameters
sxGUID[in] The GUID of the calibration.

◆ GetCalibrationGUIDs() [1/2]

static void Rx::LFR::CCalibrationManager::GetCalibrationGUIDs ( CRxArrayString asxGUIDs)
static

Gets an array with GUIDs of all calibrations.

Parameters
asxGUIDs[out] The GUIDs array.

◆ GetCalibrationGUIDs() [2/2]

static void Rx::LFR::CCalibrationManager::GetCalibrationGUIDs ( CRxArrayString asxGUIDs,
const CCamera xCamera 
)
static

Gets an array with GUIDs of all calibrations of the given camera.

Parameters
asxGUIDs[out] The GUIDs array.
xCamera[in] The camera.

◆ GetCameraName()

static CRxString Rx::LFR::CCalibrationManager::GetCameraName ( const CCamera xCamera)
static

Gets the Raytrix name of the given camera.

Parameters
xCamera[in] The camera to get the name of.
Returns
The Raytrix camera name.

◆ GetCameraSerial()

static CRxString Rx::LFR::CCalibrationManager::GetCameraSerial ( const CCamera xCamera)
static

Gets the Raytrix serial of the given camera.

Parameters
xCamera[in] The camera to get the serial of.
Returns
The Raytrix camera serial.

◆ GetDefaultCalibrationGUID() [1/2]

static CRxString Rx::LFR::CCalibrationManager::GetDefaultCalibrationGUID ( const CCamera xCamera)
static

Gets the GUID of the default calibration of the given camera.

The default calibration is a calibration that has been set as default by calling SetMetaData with a CRxCalibMetaData that has the IsDefaultCalib flag set to true. By default an internal master calibration is the default one.

Parameters
xCamera[in] The camera.
Returns
The GUID of the default calibration.

◆ GetDefaultCalibrationGUID() [2/2]

static CRxString Rx::LFR::CCalibrationManager::GetDefaultCalibrationGUID ( const CRxString sxSerial,
const CRxString sxDriver 
)
static

Gets the GUID of the default calibration of the given camera defined by the camera serial and the driver name.

The default calibration is a calibration that has been set as default by calling SetMetaData with a CRxCalibMetaData that has the IsDefaultCalib flag set to true. By default an internal master calibration is the default one.

Parameters
sxSerial[in] The serial of the camera.
sxDriver[in] The driver name of the camera.
Returns
The GUID of the default calibration.

◆ GetImpl() [1/2]

CCalibrationManager_Impl & Rx::LFR::CPimpl< CCalibrationManager_Impl , Interfaces::ECalibManager::ID >::GetImpl
inlineinherited

Gets the non constant implementation.

Returns
The implementation.

◆ GetImpl() [2/2]

const CCalibrationManager_Impl & Rx::LFR::CPimpl< CCalibrationManager_Impl , Interfaces::ECalibManager::ID >::GetImpl
inlineinherited

Gets the constant implementation.

Returns
The implementation.

◆ GetInterface() [1/2]

static void* Rx::LFR::CCalibrationManager::GetInterface ( Interfaces::ECalibManager::ID  eData)
static

Gets the interface defined by ECalibrationManagerInterface.

Parameters
eData[in] The interface type.

◆ GetInterface() [2/2]

const void* Rx::LFR::CPimpl< CCalibrationManager_Impl , Interfaces::ECalibManager::ID >::GetInterface ( Interfaces::ECalibManager::ID  eInterface) const
inherited

Gets the interface defined by the given interface ID.

Parameters
eInterface[in] The interface ID.
Returns
Null if it fails, else the interface.

◆ GetMasterCalibrationGUID() [1/2]

static CRxString Rx::LFR::CCalibrationManager::GetMasterCalibrationGUID ( const CCamera xCamera)
static

Gets the GUID of the master calibration of the given camera.

Parameters
xCamera[in] The camera.
Returns
The GUID of the master calibration.

◆ GetMasterCalibrationGUID() [2/2]

static CRxString Rx::LFR::CCalibrationManager::GetMasterCalibrationGUID ( const CRxString sxSerial,
const CRxString sxDriver 
)
static

Gets the GUID of the master calibration of the given camera defined by the camera serial and the driver name.

Parameters
sxSerial[in] The serial of the camera.
sxDriver[in] The driver name of the camera.
Returns
The GUID of the master calibration.

◆ GetMasterCalibrationGUIDs()

static void Rx::LFR::CCalibrationManager::GetMasterCalibrationGUIDs ( CRxArrayString asxGUIDs)
static

Gets an array with GUIDs of all master calibrations. Each camera has a single master calibration.

Parameters
asxGUIDs[out] The GUIDs array.

◆ GetMetaData()

static void Rx::LFR::CCalibrationManager::GetMetaData ( CRxCalibMetaData xData,
const CRxString sxGUID 
)
static

Gets the calibration meta data of the given calibration.

Parameters
xData[out] The meta data.
sxGUID[in] The GUID of the calibration.

◆ HasDatabase()

static bool Rx::LFR::CCalibrationManager::HasDatabase ( const CCamera xCamera)
static

Queries if the there is a calibration database for the given camera.

Parameters
xCamera[in] The camera.
Returns
True if a database for the given camera exists, false if not.

◆ HasInterface()

bool Rx::LFR::CPimpl< CCalibrationManager_Impl , Interfaces::ECalibManager::ID >::HasInterface ( Interfaces::ECalibManager::ID  eInterface)
inlineinherited

Queries if this object has the given interface.

Parameters
eInterface[in] The interface to query.
Returns
True if this class has the given interface, false if not.

◆ Initialize() [1/2]

static void Rx::LFR::CCalibrationManager::Initialize ( )
static

Initializes this calibration manager and reads all calibrations from disk.

You don't need to call this method. It's called automatically on the first access. But you can call it if you want to change the calibration folder or if you want to initialize this class at a certain time.

◆ Initialize() [2/2]

static void Rx::LFR::CCalibrationManager::Initialize ( const CRxString sxFolder)
static

Initializes this calibration manager and reads all calibrations from disk.

You don't need to call this method. It's called automatically on the first access. But you can call it if you want to change the calibration folder or if you want to initialize this class at a certain time.

Parameters
sxFolder[in] The folder that holds the calibrations. If empty, the default folder is used.

◆ LoadCalibration()

static void Rx::LFR::CCalibrationManager::LoadCalibration ( CCalibration xCalib,
const CRxString sxGUID,
bool  bLoadGrayImg 
)
static

Loads the calibration with the given GUID.

Parameters
xCalib[out] The loaded calibration.
sxGUID[in] The GUID of the calibration.
bLoadGrayImg[in] True to load the gray image from disk. The image is invalid if there isn't a gray image. False to load no gray image.

◆ LoadDefaultCalibration() [1/2]

static void Rx::LFR::CCalibrationManager::LoadDefaultCalibration ( CCalibration xCalib,
const CCamera xCamera,
bool  bLoadGrayImg 
)
static

Loads the default calibration of the given camera.

The default calibration is a calibration that has been set as default by calling SetMetaData with a CRxCalibMetaData that has the IsDefaultCalib flag set to true. By default an internal master calibration is the default one.

Parameters
xCalib[out] The loaded calibration.
xCamera[in] The camera.
bLoadGrayImg[in] True to load the gray image from disk. The image is invalid if there isn't a gray image. False to load no gray image.

◆ LoadDefaultCalibration() [2/2]

static void Rx::LFR::CCalibrationManager::LoadDefaultCalibration ( CCalibration xCalib,
const CRxString sCameraSerial,
const CRxString sDriverName,
bool  bLoadGrayImg 
)
static

Loads the default calibration of the given camera defined by the camera serial and the driver name.

The default calibration is a calibration that has been set as default by calling SetMetaData with a CRxCalibMetaData that has the IsDefaultCalib flag set to true. By default an internal master calibration is the default one.

Parameters
xCalib[out] The loaded calibration.
sCameraSerial[in] The camera serial.
sDriverName[in] The driver name.
bLoadGrayImg[in] True to load the gray image from disk. The image is invalid if there isn't a gray image. False to load no gray image.

◆ PatchCalibration()

static void Rx::LFR::CCalibrationManager::PatchCalibration ( const CRxString sxGUID)
static

Patch the calibration given by its GUID, by overwriting required values to valid ones.

Requires Dongle::ERuntimeFeature::Save to save this change permanently.

Parameters
sxGUIDThe GUID of the calibration.

◆ SaveCalibration()

static void Rx::LFR::CCalibrationManager::SaveCalibration ( const CCalibration xCalib,
const CRxString sxGUID,
bool  bSaveGrayImg 
)
static

Saves the given calibration to disk.

Requires Dongle::ERuntimeFeature::Save to save this change permanently.

Parameters
xCalibThe calibration.
sxGUIDThe GUID of the calibration.
bSaveGrayImgTrue to save the gray image to disk. Throws an exception if the gray image is invalid. False to save the calibration without a gray image.

◆ SetCameraName()

static void Rx::LFR::CCalibrationManager::SetCameraName ( const CCamera xCamera,
const CRxString sxName 
)
static

Sets the Raytrix name of the given camera. Requires Dongle::ERuntimeFeature::Master.

Parameters
xCamera[in] The camera to set the name of.
sxName[in] The name.

◆ SetCameraSerial()

static void Rx::LFR::CCalibrationManager::SetCameraSerial ( const CCamera xCamera,
const CRxString sxSerial 
)
static

Sets the Raytrix serial of the given camera. Requires Dongle::ERuntimeFeature::Master.

Parameters
xCamera[in] The camera to set the serial of.
sxSerial[in] The serial.

◆ SetMetaData()

static void Rx::LFR::CCalibrationManager::SetMetaData ( const CRxCalibMetaData xData,
const CRxString sxGUID 
)
static

Sets the calibration meta data of the given calibration. Trying to set the meta data of the master calibration will throw an exception, as the master calibration cannot be set.

Requires Dongle::ERuntimeFeature::Save to save this change permanently.

Parameters
xData[in] The meta data.
sxGUID[in] The GUID of the calibration.