dng_1d_table Class Reference

A 1D floating-point lookup table using linear interpolation. More...

#include <dng_1d_table.h>

List of all members.


Public Types

enum  { kTableBits = 12, kTableSize = (1 << kTableBits) }
 Constants denoting size of table.

Public Member Functions

void Initialize (dng_memory_allocator &allocator, const dng_1d_function &function, bool subSample=false)
real32 Interpolate (real32 x) const
const real32 * Table () const
 Direct access function for table data.
void Expand16 (uint16 *table16) const
 Expand the table to a 16-bit to 16-bit table.

Protected Attributes

AutoPtr< dng_memory_blockfBuffer
real32 * fTable

Detailed Description

A 1D floating-point lookup table using linear interpolation.

Member Function Documentation

void dng_1d_table::Initialize ( dng_memory_allocator allocator,
const dng_1d_function function,
bool  subSample = false 
)

Set up table, initialize entries using functiion. This method can throw an exception, e.g. if there is not enough memory.

Parameters:
allocator Memory allocator from which table memory is allocated.
function Table is initialized with values of finction.Evalluate(0.0) to function.Evaluate(1.0).
subSample If true, only sample the function a limited number of times and interpolate.

References dng_memory_allocator::Allocate(), dng_1d_function::Evaluate(), and AutoPtr< T >::Reset().

real32 dng_1d_table::Interpolate ( real32  x  )  const [inline]

Lookup and interpolate mapping for an input.

Parameters:
x value from 0.0 to 1.0 used as input for mapping
Return values:
Approximation of function.Evaluate(x)

References DNG_ASSERT.


The documentation for this class was generated from the following files:

Copyright © 2006-2009 Adobe Systems Incorporated.

Use of this website signifies your agreement to the Terms of Use and Online Privacy Policy.

Search powered by Google