GetFunctionalLookupTable method (Main Control)

Visual Basic example
Visual C++ 5.0 example

Syntax short GetFunctionalLookupTable(long nStart, long nEnd, short nFactor, short uFlag);

Overview:  Refer to Using Histograms.

Remarks

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

The nFactor parameter is used for log and exp functions only.

If uFlag is FLT_EXP the value of nFactor modifies the lookup table values according to the following equations:

image\equ1.gif

where :

nFirstValue = exp(nFactor * nStart/nEnd).

nLastValue = exp(nFactor)

x = the intensity value of the selected point

If uFlag is FLT_LN the value of nFactor modifies the lookup table values according to the following equations:

image\equ2.gif

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:

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

This method supports 12 and 16-bit grayscale and 48 and 64-bit color images. Support for 12 and 16-bit grayscale images and 48 and 64-bit color images is available only in the Document/Medical toolkits.

See Also

Elements:  GetUserLookUpTable method, RemapIntensity method, RemapTable property, RemapTableSize property

Topic Changing Brightness and Contrast