SetDataUnsignedChar
Description
SetDataUnsignedChar gives the data to the plugin.
Syntax
int SetDataUnsignedChar(const wchar_t* iwszParameterName, const unsigned int iunTableSize, const unsigned char* ipTable);
Parameters
Input
- iwszParameterName: Data name the "ipTable" contains. See the list of possibles values bellow.
- iunTableSize: Size of the table "ipTable".
- ipTable: A table that contains the data.
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_INVALID_DATA 4
struct DataUnsignedChar
{
unsigned int Size;
unsigned char* Table;
};
std::map<std::wstring, DataUnsignedChar> gmDatas;
int SetDataUnsignedChar(const wchar_t* iwszParameterName, const unsigned int iunTableSize, const unsigned char* ipTable)
{
if (iunTableSize != 0 && ipTable != NULL)
{
DataUnsignedInt theData;
theData.Size = iunTableSize;
theData.Table = ipTable;
std::wstring parameterName(iwszParameterName);
gmDatas[parameterName] = theData;
}
else
{
return OPT_PLUGIN_ERROR_INVALID_DATA;
}
return OPT_PLUGIN_NO_ERROR;
}
List of the possible value of "iwszParameterName"
Parameter name |
Unit |
Description |
Organization |
---|---|---|---|
OutputImage |
Pixels array containing warping image result. | RGB | |
InputImage |
Pixels array containing image to be warped. | RGB |