GetFunctionalLookupTable method (ILEADRasterProcess)

Visual Basic example

Visual C++ 5.0 example

 

Syntax

short GetFunctionalLookupTable(ILEADRaster pRaster, long nStart, long nEnd, short nFactor, GetLookupTableFlags Flag);

Overview

Refer to Using Histograms.

Remarks

Updates a range of entries in the RemapTable property array, based on the specified mathematical function.

The nFactor parameter is used for log, exp and sigmoid functions only. If nFactor is 0 the method performs a linear interpolation between the two points nStart and nEnd and stores the results in the lookup table, regardless of the value set in Flag.

If Flag is GL_EXP the value of nFactor modifies the lookup table values according to the following equations:

Y

=

nStart

+

(nEnd – nStart) * (exp ((nFactor/10.0 * (x-nStart))/(nEnd-nStart)) - nFirstValue)

 

 

 

 

(nLastValue – nFirstValue)

where :

nFirstValue = exp(nFactor * nStart/nEnd)nLastValue = exp(nFactor)

x = the intensity value of the selected point

If Flag is GL_LN the value of nFactor modifies the lookup table values according to the following equations:

where:

nFirstValue = ln(1+ (nFactor * nStart/nEnd))nLastValue = ln(1 + nFactor)

x = the intensity value of the selected point

In the case of linear function, nFactor has no effect. The method performs a linear interpolation between the two points nStart and nEnd and stores the results in the lookup table. The user determines the two points nStart and nEnd and their new values, nFirstValue and nLastValue. The value nFirstValue should be stored in the lookup table at the nStart position and nLastValue at the nEnd position of the lookup table before calling this method.

As an example, suppose a user wants to select a point, change the intensity value of that point (x), and then perform two linear interpolations:

image\sqrblit.gif from 0 to the intensity value x

image\sqrblit.gif from intensity value x to the end of the range

To accomplish this, the user would proceed by doing the following:

image\sqrblit.gif Select the point and get its intensity value (x)

image\sqrblit.gif Change the intensity value of the selected point to some new value (newCol).

image\sqrblit.gif Store the new intensity value in the Lookup table by assignment:

RemapTable(x) = newCol

image\sqrblit.gif Call GetFunctionalLookupTable with nStart set to 0, nEnd set to x, and Flag set to GL_LINEAR.

image\sqrblit.gif Call GetFunctionalLookupTable with nStart set to x, nEnd set to 255, and Flag set to GL_LINEAR. (For the example, assume the image is 8-bits per pixel.)

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements:

GetUserLookUpTable method, RemapIntensity method, RemapTable property, RemapTableSize property

Topics:

Changing Brightness and Contrast