GetFunctionalLookupTable method (Main Control)
|
Builder Syntax |
int GetFunctionalLookupTable(int nStart, int nEnd, int nFactor, int nFlag); |
|
Delphi Syntax |
Function GetFunctionalLookupTable (nStart: Integer; nEnd: Integer; nFactor: Integer; nFlag: Integer): Integer; |
|
Overview |
Refer to Using Histograms. |
Remarks
Updates a range of entries in the HistogramTable property array, based on the specified mathematical method.
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:

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:

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:
from 0 to the intensity value x
from intensity value x to the end of the range
To accomplish this, the user would proceed by doing the following:
Select the point and get its intensity value (x)
Change the intensity value of the selected point to some
new value (newCol).
Store the new intensity value in the Lookup table by
assignment:
RemapTable(x) = newCol
Call GetFunctionalLookupTable with nStart set to 0, nEnd
set to x, and uFlag set to FLT_LINEAR.
Call GetFunctionalLookupTable with nStart set to x, nEnd
set to 255, and uFlag set to FLT_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: |