PDFSampleFunction¶
Namespace: O2S.Components.PDF4NET.PDFFunctions
Defines a type 0 (Sampled) function.
Inheritance Object → PDFFunction → PDFSampleFunction
Remarks
Type 0 PDF functions use a sequence of sample values (contained in a stream) to provide an approximation for functions whose domains and ranges are bounded. The samples are organized as an m-dimensional table in which each entry has n components.
Constructors¶
PDFSampleFunction()¶
Initilizes a new PDFSampleFunction object.
PDFSampleFunction(Int32[], Int32, PDFFunctionInterpolationMode, Double[], Double[], Byte[])¶
Initializes new PDFSampleFunction object.
public PDFSampleFunction(Int32[] size, int bitsPerSample, PDFFunctionInterpolationMode interpolationMode, Double[] encode, Double[] decode, Byte[] samples)
Parameters
size Int32[]
An array of m positive integers specifying the number of samples
in each input dimension of the sample table.
bitsPerSample Int32
The number of bits used to represent each sample.
interpolationMode PDFFunctionInterpolationMode
The interpolation mode between samples.
encode Double[]
An array of 2 x m numbers specifying the linear mapping of
input values into the domain of the function's sample table.
decode Double[]
An array of 2 x n numbers specifying the linear mapping
of sample values into the range appropriate for the function's output values.
samples Byte[]
Sample function data.
Properties¶
BitsPerSample¶
Gets or sets the bits per sample.
Property Value
Int32
The number of bits used to represent each sample.
Remarks
If the function has multiple output values, each one occupies BitsPerSample bits. Valid values are 1, 2, 4, 8, 12, 16, 24, and 32.
Decode¶
Gets or sets the function's decoding array.
Property Value
Double[]
An array of 2 x n numbers specifying the linear mapping of sample
values into the range appropriate for the function's output values.
Domain¶
Gets or sets the function domain.
Property Value
Double[]
An array of 2 x m numbers, where m is the number of input values.
Encode¶
Gets or sets the function's encoding array.
Property Value
Double[]
An array of 2 x m numbers specifying the linear mapping of input
values into the domain of the function's sample table.
InterpolationMode¶
Gets or sets the interpolation mode.
Property Value
PDFFunctionInterpolationMode
A PDFFunctionInterpolationMode that represents
the order of interpolation between samples.
Range¶
Gets or sets the function range.
Property Value
Double[]
An array of 2 x n numbers, where n is the number of output values.
Samples¶
Get or sets the function samples.
Property Value
Byte[]
An array of sample values used for interpolation.
Size¶
Gets or sets the number of samples.
Property Value
Int32[]
An array of m positive integers specifying the number of samples
in each input dimension of the sample table.