CustomProcess_GetRow Function

Applies To: Implementing a custom process

Processes and returns one row of pixels.

This function takes in a row index and requests an input row using the callback function getRowfn and returns an output buffer containing a row of processed pixels. The size of the output row has to match the information communicated by the rasterInfo object provided in CustomProcess_Initialize and the parameters provided in CustomProcess_SetWindow.


CustomProcess_API const unsigned char__stdcall CustomProcess_GetRow(

    void* clientHandle, unsigned long rowIndex);


[in] clientHandle

Unique ID used to identify the caller.

[in] rowIndex

Index of the row being requested. (Usually in the range [startRow, endRow))

Return Value

A row of processed pixels as an array of unsigned characters.

Reporting errors and warnings: Any errors can be obtained by calling the GetLastError function which will give out the error message for the last error in the SLL.


The following example represents a partial C++ implementation of this function:


CustomProcess_API const unsigned char__stdcall CustomProcess_GetRow(void* clientHandle,

                                 unsigned long rowIndex)


    ClientHandle* myClientHandle = (ClientHandle*)clientHandle;


    unsigned char* myInputBuffer = (unsigned char*)myClientHandle->myGetRowfn(

       myClientHandle->myCallbackObject, rowIndex);


    unsigned long i = 0;

    for (;i < myClientHandle->bufferSize; ++i)


        value = myInputBuffer[i] + 10;

        forceBounds(0, value, 255);

        myClientHandle->myOutputBuffer[i] = (unsigned char)value;


    return myClientHandle->myOutputBuffer;


For a detailed example on how to implement this function, see Sample custom process.

Related Topics

See also: CustomProcess_Create, CustomProcess_SetWindow, CustomProcess_Initialize, CustomProcess_GetMetadata, CustomProcess_GetLastError, CustomProcess_Cleanup, CustomProcess_SetCallbackFunctions, CustomProcess_SetAreaOfInterest, CustomProcessUI_Init, CustomProcessUI_ShowModalDialog, CustomProcessUI_GetUpdatedXML, CustomProcessUI_GetStatus, CustomProcessUI_GetProperty, CustomProcessUI_SetProperty, CustomProcessUIForm_GetUpdatedXML, CustomProcessUIForm_Init