GetAlgoDescription

Description

GetAlgoDescription returns the description or the name of the algorithm. This description appears in the Graphical User Interface (GUI) and in the report.

Syntax

int GetAlgoDescription(const unsigned int iunAlgoIndex, wchar_t*& owszDescription);

Parameters

Input

iunAlgoIndex: the identification number of the algorithm returned in the description:

  • 0: nearest algorithm, low quality warping.
  • 1: bilinear algorithm, high quality warping.

Output

owszDescription: the description of the algorithm identified by the number "iunAlgoIndex".

Return

(int): returns the identification number of the error if an error occurs or 0 if no error occurs.

Example

#define OPT_PLUGIN_NO_ERROR 0
#define OPT_PLUGIN_ERROR_UNKNOWN_TEST 3

std::map<int, std::wstring> gmAlgoDescription;
     
gmTestDescription[0] = L" Bilinear ";
     gmTestDescription[1] = L" Bicubic ";
     gmTestDescritpion[2] = L" Polynomial";

OPT_HIW_API int GetAlgoDescription(const unsigned int iunAlgoIndex, wchar_t*& owszDescription)
{
     // Check if the algo index is not outside of the algo vector
     if (iunAlgoIndex < gvAlgos.size())
     {
owszDescription = const_cast<wchar_t*>(gvAlgos[iunAlgoIndex].Description.c_str());
     }
     else
     {
return OPT_PLUGIN_ERROR_UNKNOWN_ALGO;
     }
     return OPT_PLUGIN_NO_ERROR;
}