Raytrix Light Field SDK  4.0
Logo
Public Member Functions | Static Public Member Functions | List of all members
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 &sxCamType, const CRxString &sxCamSerial)
 Creates a new calibration and assigns it to the given camera (defined by type and serial). More...
 
static CRxString CreateCalibration (const CRxString &sxCamHardwareID)
 Creates a new calibration and assigns it to the given camera (defined by hardware ID). More...
 
static void CreateDatabase (const CCamera &xCamera, bool bForce)
 Creates a calibration database for the given camera. 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 CreateDatabase (const CRxString &sxCamHardwareID, bool bForce)
 Creates a calibration database for the given camera (defined by hardware ID). More...
 
static void DeleteCalibration (const CRxString &sxGUID)
 Deletes the calibration with the given GUID. More...
 
static void GetCalibrationGUIDs (CRxArrayString &asxGUIDs)
 Gets an array of GUIDs from all calibrations. More...
 
static void GetCalibrationGUIDs (CRxArrayString &asxGUIDs, const CCamera &xCamera)
 Gets an array of GUIDs from 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 of GUIDs from 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 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. The meta data of the master calibration cannot be set. More...
 

Member Function Documentation

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
xCameraThe camera.
Returns
The GUID of the created calibration.
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
sxCamTypeThe camera type. This is 'TypeA' for type A cameras.
sxCamSerialThe camera serial.
Returns
The GUID of the created calibration.
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
sxCamHardwareIDThe camera hardware ID. This is 'TypeA_012' for type A cameras with serial 012.
Returns
The GUID of the created calibration.
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
xCameraThe camera.
bForceTrue to enforce the creation even if the calibration already exists. Otherwise an exception is thrown.
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
sxCamTypeThe camera type. This is 'TypeA' for type A cameras.
sxCamSerialThe camera serial.
bForceTrue to enforce the creation even if the calibration already exists. Otherwise an exception is thrown.
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
sxCamHardwareIDThe camera hardware ID. This is 'TypeA_012' for type A cameras with serial 012.
bForceTrue to enforce the creation even if the calibration already exists. Otherwise an exception is thrown.
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
sxGUIDThe GUID of the calibration.
static void Rx::LFR::CCalibrationManager::GetCalibrationGUIDs ( CRxArrayString asxGUIDs)
static

Gets an array of GUIDs from all calibrations.

Parameters
asxGUIDs[out] The GUIDs array.
static void Rx::LFR::CCalibrationManager::GetCalibrationGUIDs ( CRxArrayString asxGUIDs,
const CCamera xCamera 
)
static

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

Parameters
asxGUIDs[out] The GUIDs array.
xCameraThe camera.
static CRxString Rx::LFR::CCalibrationManager::GetCameraName ( const CCamera xCamera)
static

Gets the Raytrix name of the given camera.

Parameters
xCameraThe camera.
Returns
The Raytrix camera name.
static CRxString Rx::LFR::CCalibrationManager::GetCameraSerial ( const CCamera xCamera)
static

Gets the Raytrix serial of the given camera.

Parameters
xCameraThe camera.
Returns
The Raytrix camera serial.
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
xCameraThe camera.
Returns
The GUID of the default calibration.
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
sxSerialThe serial of the camera.
sxDriverThe driver name of the camera.
Returns
The GUID of the default calibration.
CCalibrationManager_Impl & Rx::LFR::CPimpl< CCalibrationManager_Impl , Interfaces::ECalibManager::ID >::GetImpl ( )
inlineinherited

Gets the non constant implementation.

Returns
The implementation.
const CCalibrationManager_Impl & Rx::LFR::CPimpl< CCalibrationManager_Impl , Interfaces::ECalibManager::ID >::GetImpl ( ) const
inlineinherited

Gets the constant implementation.

Returns
The implementation.
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
eInterfaceThe interface ID.
Returns
Null if it fails, else the interface.
static void* Rx::LFR::CCalibrationManager::GetInterface ( Interfaces::ECalibManager::ID  eData)
static

Gets the interface defined by ECalibrationManagerInterface.

Parameters
eDataThe interface type.
static CRxString Rx::LFR::CCalibrationManager::GetMasterCalibrationGUID ( const CCamera xCamera)
static

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

Parameters
xCameraThe camera.
Returns
The GUID of the master calibration.
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.
static void Rx::LFR::CCalibrationManager::GetMasterCalibrationGUIDs ( CRxArrayString asxGUIDs)
static

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

Parameters
asxGUIDs[out] The GUIDs array.
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.
sxGUIDThe GUID of the calibration.
static bool Rx::LFR::CCalibrationManager::HasDatabase ( const CCamera xCamera)
static

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

Parameters
xCameraThe camera.
Returns
True if a database for the given camera exists, false if not.
bool Rx::LFR::CPimpl< CCalibrationManager_Impl , Interfaces::ECalibManager::ID >::HasInterface ( Interfaces::ECalibManager::ID  eInterface)
inlineinherited

Queries if this object has the given interface.

Parameters
eInterfaceThe interface to query.
Returns
True if this class has the given interface, false if not.
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.

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
sxFolderThe folder that holds the calibrations. If empty, the default folder is used.
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.
sxGUIDThe GUID of the calibration.
bLoadGrayImgTrue to load the gray image from disk. The image is invalid if there isn't a gray image. False to keep the gray image of the given calibration.
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.
xCameraThe camera.
bLoadGrayImgTrue to load the gray image from disk. The image is invalid if there isn't a gray image. False to keep the gray image of the given calibration.
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.
sCameraSerialThe camera serial.
sDriverNameThe driver name.
bLoadGrayImgTrue to load the gray image from disk. The image is invalid if there isn't a gray image. False to keep the gray image of the given calibration.
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 keep the current gray image.
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
xCameraThe camera.
sxNameThe name.
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
xCameraThe camera.
sxSerialThe name.
static void Rx::LFR::CCalibrationManager::SetMetaData ( const CRxCalibMetaData xData,
const CRxString sxGUID 
)
static

Sets the calibration meta data of the given calibration. The meta data of the master calibration cannot be set.

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

Parameters
xDataThe meta data.
sxGUIDThe GUID of the calibration.