Run

Description

Run executes the requested algorithm computation with the given inputs and writes down the result into the output array parameter "OutputImage".

Syntax

OPT_HIW_API int Run(const unsigned int iunAlgoIndex);

Parameters

Input

iunAlgoIndex: Algorithm to be used for the warping computation.

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

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_INIT_ERROR 1

struct DataUnsignedInt
{
     unsigned int ValuesSize; // size of uint table
     const unsigned int* Values; // pointer to uint table
};

int Run(const unsigned int iunAlgoIndex) 
{
     DataUnsignedInt& theData = gmDatasUint[L"OutputImage"];
     theData.Values = ComputeWarping(iunAlgoIndex);
     
return OPT_PLUGIN_NO_ERROR;
}