Processing math: 100%
MedicalVisualization

1D Texture Interpolation

1D Textures | | Bilinear Interpolation

For the case of a nearest-neighbour interpolation (GL_NEAREST) the closest color value of the table for the index t is:

fnearest(t)=RGB[tn+0.5]

For the case of a linear interpolation (GL_LINEAR) we require the left- and right-hand color values for the index t:

fleft(t)=RGB[tn]
fright(t)=RGB[tn+1]

The interpolated color value is computed by linear interpolation of the above two color values with the interpolation weight w with

w=tntn

so that

f(t)=(1w)RGB[tn]+wRGB[tn+1]

This interpolation scheme is done automatically by the graphics hardware requiring about 6 flops (per rasterized fragment). The same scheme applies to 2D (bilinear) and 3D textures (trilinear).

1D Textures | | Bilinear Interpolation

Options: