|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.media.jai.Interpolation | +--javax.media.jai.InterpolationTable
A subclass of Interpolation that uses tables to store the interpolation kernels. The set of subpixel positions is broken up into a fixed number of "bins" and a distinct kernel is used for each bin. The number of bins must be a power of two.
An InterpolationTable defines a separable interpolation, with a set of kernels for each dimension. The number of bins may vary between the two dimensions. Both the horizontal and vertical interpolation kernels have a "key" element. This element is positioned over the which The kernels are stored in double precision, floating- and fixed-point form. The fixed point representation has a user-specified fractional precision. It is the user's responsibility to specify an appropriate level of precision that will not cause overflow when accumulating the results of a convolution against a set of source pixels, using 32-bit integer arithmetic.
Field Summary | |
protected double[] |
dataHd
The horizontal coefficient data in double format. |
protected float[] |
dataHf
The horizontal coefficient data in floating-point format. |
protected int[] |
dataHi
The horizontal coefficient data in fixed-point format. |
protected double[] |
dataVd
The vertical coefficient data in double format. |
protected float[] |
dataVf
The vertical coefficient data in floating-point format. |
protected int[] |
dataVi
The vertical coefficient data in fixed-point format. |
protected int |
precisionBits
The number of fractional bits used to describe filter coefficients. |
Fields inherited from class javax.media.jai.Interpolation |
bottomPadding, height, INTERP_BICUBIC, INTERP_BICUBIC_2, INTERP_BILINEAR, INTERP_NEAREST, leftPadding, rightPadding, subsampleBitsH, subsampleBitsV, topPadding, width |
Constructor Summary | |
InterpolationTable(int key,
int width,
int subsampleBits,
int precisionBits,
double[] data)
Constructs an InterpolationTable with identical horizontal and vertical resampling kernels. |
|
InterpolationTable(int key,
int width,
int subsampleBits,
int precisionBits,
float[] data)
Constructs an InterpolationTable with identical horizontal and vertical resampling kernels. |
|
InterpolationTable(int key,
int width,
int subsampleBits,
int precisionBits,
int[] data)
Constructs an InterpolationTable with identical horizontal and vertical resampling kernels. |
|
InterpolationTable(int keyX,
int keyY,
int width,
int height,
int subsampleBitsH,
int subsampleBitsV,
int precisionBits,
double[] dataH,
double[] dataV)
Constructs an InterpolationTable with specified horizontal and vertical extents (support), number of horizontal and vertical bins, fixed-point fractional precision, and double kernel entries. |
|
InterpolationTable(int keyX,
int keyY,
int width,
int height,
int subsampleBitsH,
int subsampleBitsV,
int precisionBits,
float[] dataH,
float[] dataV)
Constructs an InterpolationTable with specified horizontal and vertical extents (support), number of horizontal and vertical bins, fixed-point fractional precision, and float kernel entries. |
|
InterpolationTable(int keyX,
int keyY,
int width,
int height,
int subsampleBitsH,
int subsampleBitsV,
int precisionBits,
int[] dataH,
int[] dataV)
Constructs an InterpolationTable with specified horizontal and vertical extents (support), number of horizontal and vertical bins, fixed-point fractional precision, and int kernel entries. |
Method Summary | |
int[] |
getHorizontalTableData()
Returns the integer (fixed-point) horizontal table data. |
double[] |
getHorizontalTableDataDouble()
Returns the double horizontal table data. |
float[] |
getHorizontalTableDataFloat()
Returns the floating-point horizontal table data. |
int |
getPrecisionBits()
Returns the number of bits of fractional precision used to store the fixed-point table entries. |
int[] |
getVerticalTableData()
Returns the integer (fixed-point) vertical table data. |
double[] |
getVerticalTableDataDouble()
Returns the double vertical table data. |
float[] |
getVerticalTableDataFloat()
Returns the floating-point vertical table data. |
double |
interpolate(double s__,
double s_0,
double s_1,
double s_2,
double s0_,
double s00,
double s01,
double s02,
double s1_,
double s10,
double s11,
double s12,
double s2_,
double s20,
double s21,
double s22,
float xfrac,
float yfrac)
Performs interpolation on a 4x4 grid of double samples. |
double |
interpolate(double s00,
double s01,
double s10,
double s11,
float xfrac,
float yfrac)
Performs interpolation on a 2x2 grid of double samples. |
float |
interpolate(float s00,
float s01,
float s10,
float s11,
float xfrac,
float yfrac)
Performs interpolation on a 2x2 grid of floating-point samples. |
float |
interpolate(float s__,
float s_0,
float s_1,
float s_2,
float s0_,
float s00,
float s01,
float s02,
float s1_,
float s10,
float s11,
float s12,
float s2_,
float s20,
float s21,
float s22,
float xfrac,
float yfrac)
Performs interpolation on a 4x4 grid of floating-point samples. |
int |
interpolate(int s00,
int s01,
int s10,
int s11,
int xfrac,
int yfrac)
Performs interpolation on a 2x2 grid of integral samples. |
int |
interpolate(int s__,
int s_0,
int s_1,
int s_2,
int s0_,
int s00,
int s01,
int s02,
int s1_,
int s10,
int s11,
int s12,
int s2_,
int s20,
int s21,
int s22,
int xfrac,
int yfrac)
Performs interpolation on a 4x4 grid of integral samples. |
int |
interpolateF(int s__,
int s_0,
int s_1,
int s_2,
int s0_,
int s00,
int s01,
int s02,
int s1_,
int s10,
int s11,
int s12,
int s2_,
int s20,
int s21,
int s22,
int xfrac,
int yfrac)
Performs interpolation on a 4x4 grid of integral samples. |
double |
interpolateH(double[] samples,
float xfrac)
Performs horizontal interpolation on a one-dimensional array of double samples representing a row of samples. |
double |
interpolateH(double s_,
double s0,
double s1,
double s2,
float xfrac)
Performs horizontal interpolation on a quadruple of double samples. |
double |
interpolateH(double s0,
double s1,
float xfrac)
Performs horizontal interpolation on a pair of double samples. |
float |
interpolateH(float[] samples,
float xfrac)
Performs horizontal interpolation on a one-dimensional array of floating-point samples representing a row of samples. |
float |
interpolateH(float s0,
float s1,
float xfrac)
Performs horizontal interpolation on a pair of floating-point samples. |
float |
interpolateH(float s_,
float s0,
float s1,
float s2,
float xfrac)
Performs horizontal interpolation on a quadruple of floating-point samples. |
int |
interpolateH(int[] samples,
int xfrac)
Performs horizontal interpolation on a one-dimensional array of integral samples. |
int |
interpolateH(int s0,
int s1,
int xfrac)
Performs horizontal interpolation on a pair of integral samples. |
int |
interpolateH(int s_,
int s0,
int s1,
int s2,
int xfrac)
Performs horizontal interpolation on a quadruple of integral samples. |
double |
interpolateV(double[] samples,
float yfrac)
Performs vertical interpolation on a one-dimensional array of double samples representing a column of samples. |
double |
interpolateV(double s_,
double s0,
double s1,
double s2,
float yfrac)
Performs vertical interpolation on a quadruple of double samples. |
double |
interpolateV(double s0,
double s1,
float yfrac)
Performs vertical interpolation on a pair of double samples. |
float |
interpolateV(float[] samples,
float yfrac)
Performs vertical interpolation on a one-dimensional array of floating-point samples representing a column of samples. |
float |
interpolateV(float s0,
float s1,
float yfrac)
Performs vertical interpolation on a pair of floating-point samples. |
float |
interpolateV(float s_,
float s0,
float s1,
float s2,
float yfrac)
Performs vertical interpolation on a quadruple of floating-point samples. |
int |
interpolateV(int[] samples,
int yfrac)
Performs vertical interpolation on a one-dimensional array of integral samples. |
int |
interpolateV(int s0,
int s1,
int yfrac)
Performs vertical interpolation on a pair of integral samples. |
int |
interpolateV(int s_,
int s0,
int s1,
int s2,
int yfrac)
Performs vertical interpolation on a quadruple of integral samples. |
Methods inherited from class javax.media.jai.Interpolation |
getBottomPadding, getHeight, getInstance, getLeftPadding, getRightPadding, getSubsampleBitsH, getSubsampleBitsV, getTopPadding, getWidth, interpolate, interpolate, interpolate, isSeparable |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected int precisionBits
protected double[] dataHd
protected double[] dataVd
protected float[] dataHf
protected float[] dataVf
protected int[] dataHi
protected int[] dataVi
Constructor Detail |
public InterpolationTable(int keyX, int keyY, int width, int height, int subsampleBitsH, int subsampleBitsV, int precisionBits, int[] dataH, int[] dataV)
2subsampleBits
entries each
containing width ints.
dataH and dataV are required to contain width * 2subsampleBitsH
and height * 2subsampleBitsV
entries respectively, otherwise
an IllegalArgumentException will be thrown.
If dataV is null, it is assumed to be a copy of dataH and the keyY, height, and subsampleBitsV parameters are ignored.
keyX
- The array offset of the horizontal resampling kernel centerkeyY
- The array offset of the vertical resampling kernel centerwidth
- the width of a horizontal resampling kernel.height
- the height of a vertical resampling kernel. Ignored
if dataV is null.subsampleBitsH
- the log (base 2) of the number of horizontal
subsample positions. Must be positive.subsampleBitsV
- the log (base 2) of the number of vertical
subsample positions. Must be positive. Ignored if dataV is null.precisionBits
- the number of bits of fractional precision
to be used when resampling integral sample values. Must be positive.
The same value is used for both horizontal and vertical
resampling.dataH
- the horizontal table entries, as an int array of
2subsampleBitsH
entries each of length width. The array is cloned internally.dataV
- the vertical table entries, as an int array of
2subsampleBitsV
entries each of length height, or null. The array is cloned internally.
If null, the dataH table is used for vertical interpolation
as well and the keyY, height, and subsampleBitsV
parameters are ignored.IllegalArgumentException
- if the size of the data arrays
are incorrect.public InterpolationTable(int key, int width, int subsampleBits, int precisionBits, int[] data)
key
- The array offset of the central sample to be used during resampling.width
- the width or height of a resampling kernel.subsampleBits
- the log (base 2) of the number of
subsample positions. Must be positive.precisionBits
- the number of bits of fractional precision
to be used when resampling integral sample values. Must be positive.data
- the kernel entries, as an int array of
width*2subsampleBits
entriespublic InterpolationTable(int keyX, int keyY, int width, int height, int subsampleBitsH, int subsampleBitsV, int precisionBits, float[] dataH, float[] dataV)
2subsampleBits
entries each
containing width floats.
dataH and dataV are required to contain width * 2subsampleBitsH
and height * 2subsampleBitsV
entries respectively, otherwise
an IllegalArgumentException will be thrown.
If dataV is null, it is assumed to be a copy of dataH and the keyY, height, and subsampleBitsV parameters are ignored.
keyX
- The array offset of the horizontal resampling kernel centerkeyY
- The array offset of the vertical resampling kernel centerwidth
- the width of a horizontal resampling kernel.height
- the height of a vertical resampling kernel. Ignored
if dataV is null.subsampleBitsH
- the log (base 2) of the number of horizontal
subsample positions. Must be positive.subsampleBitsV
- the log (base 2) of the number of vertical
subsample positions. Must be positive. Ignored if dataV is null.precisionBits
- the number of bits of fractional precision
to be used when resampling integral sample values.
The same value is used for both horizontal and vertical
resampling. Must be positive.dataH
- the horizontal table entries, as a float array of
2subsampleBitsH
entries each of length width.dataV
- the vertical table entries, as a float array of
2subsampleBitsV
entries each of length height, or null.
If null, the dataH table is used for vertical interpolation
as well and the keyY, height, and subsampleBitsV
parameters are ignored.IllegalArgumentException
- if the size of the data arrays
are incorrect.public InterpolationTable(int key, int width, int subsampleBits, int precisionBits, float[] data)
key
- The number of samples to the left or above the
central sample to be used during resampling.width
- the width or height of a resampling kernel.subsampleBits
- the log (base 2) of the number of
subsample positions. Must be positive.precisionBits
- the number of bits of fractional precision
to be used when resampling integral sample values. Must be positive.data
- the kernel entries, as a float array of
width*2subsampleBits
entriespublic InterpolationTable(int keyX, int keyY, int width, int height, int subsampleBitsH, int subsampleBitsV, int precisionBits, double[] dataH, double[] dataV)
2subsampleBits
entries each
containing width doubles.
dataH and dataV are required to contain width * 2subsampleBitsH
and height * 2subsampleBitsV
entries respectively, otherwise
an IllegalArgumentException will be thrown.
If dataV is null, it is assumed to be a copy of dataH and the keyY, height, and subsampleBitsV parameters are ignored.
keyX
- The array offset of the horizontal resampling kernel centerkeyY
- The array offset of the vertical resampling kernel centerwidth
- the width of a horizontal resampling kernel.height
- the height of a vertical resampling kernel. Ignored
if dataV is null.subsampleBitsH
- the log (base 2) of the number of horizontal
subsample positions. Must be positive.subsampleBitsV
- the log (base 2) of the number of vertical
subsample positions. Must be positive. Ignored if dataV is null.precisionBits
- the number of bits of fractional precision
to be used when resampling integral sample values.
The same value is used for both horizontal and vertical
resampling. Must be positive.dataH
- the horizontal table entries, as a double array of
2subsampleBitsH
entries each of length width.dataV
- the vertical table entries, as a double array of
2subsampleBitsV
entries each of length height, or null.
If null, the dataH table is used for vertical interpolation
as well and the keyY, height, and subsampleBitsV
parameters are ignored.public InterpolationTable(int key, int width, int subsampleBits, int precisionBits, double[] data)
key
- The number of samples to the left or above the
central sample to be used during resampling.width
- the width or height of a resampling kernel.subsampleBits
- the log (base 2) of the number of
subsample positions. Must be positive.precisionBits
- the number of bits of fractional precision
to be used when resampling integral sample values. Must be positive.data
- the kernel entries, as a double array of
width*2subsampleBitsH
entriesMethod Detail |
public int getPrecisionBits()
public int[] getHorizontalTableData()
int
array of length
getWidth() * 2getSubsampleBitsH()
.
The following code, given an instance interp
of class InterpolationTable
, will perform
interpolation of a set of getWidth()
samples
at a given fractional position (bin) xfrac
between 0
and 2getSubsampleBitsH() - 1
:
int interpolateH(InterpolationTable interp, int[] samples, int xfrac) { int[] dataH = interp.getHorizontalTableData(); int precisionBits = interp.getPrecisionBits(); int round = 1 << (precisionBits - 1); int width = interp.getWidth(); int offset = width*xfrac; int sum = 0; for (int i = 0; i < width; i++) { sum += dataH[offset + i]*samples[i]; } return (sum + round) >> precisionBits; }
In practice, the values dataH
,
precisionBits
, etc., may be extracted once and
reused to interpolate multiple output pixels.
int
s.public int[] getVerticalTableData()
int
array of length
getHeight() * 2getSubsampleBitsV()
.
The following code, given an instance interp
of class InterpolationTable
, will perform
interpolation of a set of getHeight()
samples
at a given fractional position (bin) yfrac
between 0
and 2getSubsampleBitsV() - 1
:
int interpolateV(InterpolationTable interp, int[] samples, int yfrac) { int[] dataV = interp.getVerticalTableData(); int precisionBits = interp.getPrecisionBits(); int round = 1 << (precisionBits - 1); int height = interp.getHeight(); int offset = height*yfrac; int sum = 0; for (int i = 0; i < height; i++) { sum += dataV[offset + i]*samples[i]; } return (sum + round) >> precisionBits; }
In practice, the values dataV
,
precisionBits
, etc., may be extracted once and
reused to interpolate multiple output pixels.
int
s.public float[] getHorizontalTableDataFloat()
float
array of length
getWidth() * 2getSubsampleBitsH()
.
The following code, given an instance interp
of class InterpolationTable
, will perform
interpolation of a set of getWidth()
floating-point samples at a given fractional position
xfrac
between 0.0F
and 1.0F
:
float interpolateH(InterpolationTable interp, float[] samples, float xfrac) { float[] dataH = interp.getHorizontalTableDataFloat(); int width = interp.getWidth(); int numSubsamplesH = 1 << getSubsampleBitsH(); int ifrac = (int)(xfrac*numSubsamplesH); int offset = width*ifrac; float sum = 0.0F; for (int i = 0; i < width; i++) { sum += dataH[offset + i]*samples[i]; } return sum; }
In practice, the values dataH
,
numSubsamplesH
, etc., may be extracted once and
reused to interpolate multiple output pixels.
float
s.public float[] getVerticalTableDataFloat()
float
array of length
getWidth() * 2getSubsampleBitsV()
.
The following code, given an instance interp
of class InterpolationTable
, will perform
interpolation of a set of getHeight()
floating-point samples at a given fractional position
yfrac
between 0.0F
and 1.0F
:
float interpolateV(InterpolationTable interp, float[] samples, float yfrac) { float[] dataV = interp.getVerticalTableDataFloat(); int height = interp.getHeight(); int numSubsamplesV = 1 << getSubsampleBitsV(); int ifrac = (int)(yfrac*numSubsamplesV); int offset = height*ifrac; float sum = 0.0F; for (int i = 0; i < height; i++) { sum += dataV[offset + i]*samples[i]; } return sum; }
In practice, the values dataV
,
numSubsamplesV
, etc., may be extracted once and
reused to interpolate multiple output pixels.
float
s.public double[] getHorizontalTableDataDouble()
double
array of length
getWidth() * 2getSubsampleBitsH()
.
The following code, given an instance interp
of class InterpolationTable
, will perform
interpolation of a set of getWidth()
double samples at a given fractional position
xfrac
between 0.0F
and 1.0F
:
double interpolateH(InterpolationTable interp, double[] samples, float xfrac) { double[] dataH = interp.getHorizontalTableDataDouble(); int width = interp.getWidth(); int numSubsamplesH = 1 << getSubsampleBitsH(); int ifrac = (int)(xfrac*numSubsamplesH); int offset = width*ifrac; double sum = 0.0; for (int i = 0; i < width; i++) { sum += dataH[offset + i]*samples[i]; } return sum; }
In practice, the values dataH
,
numSubsamplesH
, etc., may be extracted once and
reused to interpolate multiple output pixels.
double
s.public double[] getVerticalTableDataDouble()
double
array of length
getHeight() * 2getSubsampleBitsV()
).
The following code, given an instance interp
of class InterpolationTable
, will perform
interpolation of a set of getHeight()
double samples at a given fractional position
yfrac
between 0.0F
and 1.0F
:
double interpolateV(InterpolationTable interp, double[] samples, float yfrac) { double[] dataV = interp.getVerticalTableDataDouble(); int height = interp.getHeight(); int numSubsamplesV = 1 << getSubsampleBitsV(); int ifrac = (int)(yfrac*numSubsamplesV); int offset = height*ifrac; double sum = 0.0; for (int i = 0; i < height; i++) { sum += dataV[offset + i]*samples[i]; } return sum; }
In practice, the values dataV
,
numSubsamplesV
, etc., may be extracted once and
reused to interpolate multiple output pixels.
double
s.public int interpolateH(int[] samples, int xfrac)
2subsampleBitsH-1
, an
ArrayIndexOutOfBoundsException may occur, where width is the width
of the horizontal resampling kernel.interpolateH
in class Interpolation
samples
- an array of ints.xfrac
- the subsample position, multiplied by 2subsampleBitsH
.ArrayIndexOutOfBoundsException
- if xfrac is out of bounds.public int interpolateV(int[] samples, int yfrac)
2subsampleBitsV-1
, an
ArrayIndexOutOfBoundsException may occur, where height is the
height of the vertical resampling kernel.interpolateV
in class Interpolation
samples
- an array of ints.yfrac
- the Y subsample position, multiplied by 2subsampleBitsV
.ArrayIndexOutOfBoundsException
- if yfrac is out of bounds.public int interpolateH(int s0, int s1, int xfrac)
2subsampleBitsH-1
, an
ArrayIndexOutOfBoundsException may occur, where width is the width
of the horizontal resampling kernel.interpolateH
in class Interpolation
s0
- the central sample.s1
- the sample to the right of the central sample.xfrac
- the subsample position, multiplied by 2subsampleBitsH
.ArrayIndexOutOfBoundsException
- if xfrac is out of bounds.public int interpolateH(int s_, int s0, int s1, int s2, int xfrac)
2subsampleBitsH-1
, an
ArrayIndexOutOfBoundsException may occur, where width is the width
of the horizontal resampling kernel.interpolateH
in class Interpolation
s_
- the sample to the left of the central sample.s0
- the central sample.s1
- the sample to the right of the central sample.s2
- the sample to the right of s1.xfrac
- the subsample position, multiplied by 2subsampleBitsH
.ArrayIndexOutOfBoundsException
- if xfrac is out of bounds.public int interpolateV(int s0, int s1, int yfrac)
2subsampleBitsV-1
, an
ArrayIndexOutOfBoundsException may occur, where height is the
height of the vertical resampling kernel.interpolateV
in class Interpolation
s0
- the central sample.s1
- the sample below the central sample.yfrac
- the Y subsample position, multiplied by 2subsampleBitsV
.ArrayIndexOutOfBoundsException
- if yfrac is out of bounds.public int interpolateV(int s_, int s0, int s1, int s2, int yfrac)
2subsampleBitsV-1
, an
ArrayIndexOutOfBoundsException may occur, where height is the
height of the vertical resampling kernel.interpolateV
in class Interpolation
s_
- the sample above the central sample.s0
- the central sample.s1
- the sample below the central sample.s2
- the sample below s1.yfrac
- the Y subsample position, multiplied by 2subsampleBitsV
.ArrayIndexOutOfBoundsException
- if yfrac is out of bounds.public int interpolate(int s00, int s01, int s10, int s11, int xfrac, int yfrac)
2subsampleBitsH-1
, or
yfrac does not lie between 0 and 2subsampleBitsV-1
, an
ArrayIndexOutOfBoundsException may occur, where width and height
are the width and height of the horizontal and vertical resampling
kernels respectively.interpolate
in class Interpolation
s00
- the central sample.s01
- the sample to the right of the central sample.s10
- the sample below the central sample.s11
- the sample below and to the right of the central sample.xfrac
- the X subsample position, multiplied by 2subsampleBitsH
.yfrac
- the Y subsample position, multiplied by 2subsampleBitsV
.ArrayIndexOutOfBoundsException
- if xfrac or yfrac are out of bounds.public int interpolate(int s__, int s_0, int s_1, int s_2, int s0_, int s00, int s01, int s02, int s1_, int s10, int s11, int s12, int s2_, int s20, int s21, int s22, int xfrac, int yfrac)
2subsampleBitsH-1
, or
yfrac does not lie between 0 and 2subsampleBitsV-1
, an
ArrayIndexOutOfBoundsException may occur, where width and height
are the the width and height of the horizontal and vertical
resampling kernels respectively.interpolate
in class Interpolation
s__
- the sample above and to the left of the central sample.s_0
- the sample above the central sample.s_1
- the sample above and one to the right of the central sample.s_2
- the sample above and two to the right of the central sample.s0_
- the sample to the left of the central sample.s00
- the central sample.s01
- the sample to the right of the central sample.s02
- the sample two to the right of the central sample.s1_
- the sample below and one to the left of the central sample.s10
- the sample below the central sample.s11
- the sample below and one to the right of the central sample.s12
- the sample below and two to the right of the central sample.s2_
- the sample two below and one to the left of the central sample.s20
- the sample two below the central sample.s21
- the sample two below and one to the right of the central sample.s22
- the sample two below and two to the right of the central sample.xfrac
- the X subsample position, multiplied by 2subsampleBitsH
.yfrac
- the Y subsample position, multiplied by 2subsampleBitsV
.ArrayIndexOutOfBoundsException
- if xfrac or yfrac are out of bounds.public int interpolateF(int s__, int s_0, int s_1, int s_2, int s0_, int s00, int s01, int s02, int s1_, int s10, int s11, int s12, int s2_, int s20, int s21, int s22, int xfrac, int yfrac)
2subsampleBitsH-1
, or
yfrac does not lie between 0 and 2subsampleBitsV-1
, an
ArrayIndexOutOfBoundsException may occur, where width and height
are the width and height of horizontal and vertical resampling
kernels respectively.s__
- the sample above and to the left of the central sample.s_0
- the sample above the central sample.s_1
- the sample above and one to the right of the central sample.s_2
- the sample above and two to the right of the central sample.s0_
- the sample to the left of the central sample.s00
- the central sample.s01
- the sample to the right of the central sample.s02
- the sample two to the right of the central sample.s1_
- the sample below and one to the left of the central sample.s10
- the sample below the central sample.s11
- the sample below and one to the right of the central sample.s12
- the sample below and two to the right of the central sample.s2_
- the sample two below and one to the left of the central sample.s20
- the sample two below the central sample.s21
- the sample two below and one to the right of the central sample.s22
- the sample two below and two to the right of the central sample.xfrac
- the X subsample position, multiplied by 2subsampleBitsH
.yfrac
- the Y subsample position, multiplied by 2subsampleBitsV
.ArrayIndexOutOfBoundsException
- if xfrac or yfrac are out of bounds.public float interpolateH(float[] samples, float xfrac)
interpolateH
in class Interpolation
samples
- an array of floats.xfrac
- the X subsample position, in the range [0.0F, 1.0F).ArrayIndexOutOfBoundsException
- if xfrac is out of bounds.public float interpolateV(float[] samples, float yfrac)
interpolateV
in class Interpolation
samples
- an array of floats.yfrac
- the Y subsample position, in the range [0.0F, 1.0F).ArrayIndexOutOfBoundsException
- if yfrac is out of bounds.public float interpolateH(float s0, float s1, float xfrac)
interpolateH
in class Interpolation
s0
- the central sample.s1
- the sample to the right of the central sample.xfrac
- the X subsample position, in the range [0.0F, 1.0F).ArrayIndexOutOfBoundsException
- if xfrac is out of bounds.public float interpolateH(float s_, float s0, float s1, float s2, float xfrac)
interpolateH
in class Interpolation
s_
- the sample to the left of the central sample.s0
- the central sample.s1
- the sample to the right of the central sample.s2
- the sample to the right of s1.xfrac
- the X subsample position, in the range [0.0F, 1.0F).ArrayIndexOutOfBoundsException
- if xfrac is out of bounds.public float interpolateV(float s0, float s1, float yfrac)
interpolateV
in class Interpolation
s0
- the central sample.s1
- the sample below the central sample.yfrac
- the Y subsample position, in the range [0.0F, 1.0F).ArrayIndexOutOfBoundsException
- if yfrac is out of bounds.public float interpolateV(float s_, float s0, float s1, float s2, float yfrac)
interpolateV
in class Interpolation
s_
- the sample above the central sample.s0
- the central sample.s1
- the sample below the central sample.s2
- the sample below s1.yfrac
- the Y subsample position, in the range [0.0F, 1.0F).ArrayIndexOutOfBoundsException
- if yfrac is out of bounds.public float interpolate(float s00, float s01, float s10, float s11, float xfrac, float yfrac)
interpolate
in class Interpolation
s00
- the central sample.s01
- the sample to the right of the central sample.s10
- the sample below the central sample.s11
- the sample below and to the right of the central sample.xfrac
- the X subsample position, in the range [0.0F, 1.0F).yfrac
- the Y subsample position, in the range [0.0F, 1.0F).ArrayIndexOutOfBoundsException
- if xfrac or yfrac are out of bounds.public float interpolate(float s__, float s_0, float s_1, float s_2, float s0_, float s00, float s01, float s02, float s1_, float s10, float s11, float s12, float s2_, float s20, float s21, float s22, float xfrac, float yfrac)
interpolate
in class Interpolation
s__
- the sample above and to the left of the central sample.s_0
- the sample above the central sample.s_1
- the sample above and one to the right of the central sample.s_2
- the sample above and two to the right of the central sample.s0_
- the sample to the left of the central sample.s00
- the central sample.s01
- the sample to the right of the central sample.s02
- the sample two to the right of the central sample.s1_
- the sample below and one to the left of the central sample.s10
- the sample below the central sample.s11
- the sample below and one to the right of the central sample.s12
- the sample below and two to the right of the central sample.s2_
- the sample two below and one to the left of the central sample.s20
- the sample two below the central sample.s21
- the sample two below and one to the right of the central sample.s22
- the sample two below and two to the right of the central sample.xfrac
- the X subsample position, in the range [0.0F, 1.0F).yfrac
- the Y subsample position, in the range [0.0F, 1.0F).ArrayIndexOutOfBoundsException
- if xfrac or yfrac are out of bounds.public double interpolateH(double[] samples, float xfrac)
interpolateH
in class Interpolation
samples
- an array of doubles.xfrac
- the X subsample position, in the range [0.0F, 1.0F).ArrayIndexOutOfBoundsException
- if xfrac is out of bounds.public double interpolateV(double[] samples, float yfrac)
interpolateV
in class Interpolation
samples
- an array of doubles.yfrac
- the Y subsample position, in the range [0.0F, 1.0F).ArrayIndexOutOfBoundsException
- if yfrac is out of bounds.public double interpolateH(double s0, double s1, float xfrac)
interpolateH
in class Interpolation
s0
- the central sample.s1
- the sample to the right of the central sample.xfrac
- the X subsample position, in the range [0.0F, 1.0F).ArrayIndexOutOfBoundsException
- if xfrac is out of bounds.public double interpolateH(double s_, double s0, double s1, double s2, float xfrac)
interpolateH
in class Interpolation
s_
- the sample to the left of the central sample.s0
- the central sample.s1
- the sample to the right of the central sample.s2
- the sample to the right of s1.xfrac
- the X subsample position, in the range [0.0F, 1.0F).ArrayIndexOutOfBoundsException
- if xfrac is out of bounds.public double interpolateV(double s0, double s1, float yfrac)
interpolateV
in class Interpolation
s0
- the central sample.s1
- the sample below the central sample.yfrac
- the Y subsample position, in the range [0.0F, 1.0F).ArrayIndexOutOfBoundsException
- if yfrac is out of bounds.public double interpolateV(double s_, double s0, double s1, double s2, float yfrac)
interpolateV
in class Interpolation
s_
- the sample above the central sample.s0
- the central sample.s1
- the sample below the central sample.s2
- the sample below s1.yfrac
- the Y subsample position, in the range [0.0F, 1.0F).ArrayIndexOutOfBoundsException
- if yfrac is out of bounds.public double interpolate(double s00, double s01, double s10, double s11, float xfrac, float yfrac)
interpolate
in class Interpolation
s00
- the central sample.s01
- the sample to the right of the central sample.s10
- the sample below the central sample.s11
- the sample below and to the right of the central sample.xfrac
- the X subsample position, in the range [0.0F, 1.0F).yfrac
- the Y subsample position, in the range [0.0F, 1.0F).ArrayIndexOutOfBoundsException
- if xfrac or yfrac are out of bounds.public double interpolate(double s__, double s_0, double s_1, double s_2, double s0_, double s00, double s01, double s02, double s1_, double s10, double s11, double s12, double s2_, double s20, double s21, double s22, float xfrac, float yfrac)
interpolate
in class Interpolation
s__
- the sample above and to the left of the central sample.s_0
- the sample above the central sample.s_1
- the sample above and one to the right of the central sample.s_2
- the sample above and two to the right of the central sample.s0_
- the sample to the left of the central sample.s00
- the central sample.s01
- the sample to the right of the central sample.s02
- the sample two to the right of the central sample.s1_
- the sample below and one to the left of the central sample.s10
- the sample below the central sample.s11
- the sample below and one to the right of the central sample.s12
- the sample below and two to the right of the central sample.s2_
- the sample two below and one to the left of the central sample.s20
- the sample two below the central sample.s21
- the sample two below and one to the right of the central sample.s22
- the sample two below and two to the right of the central sample.xfrac
- the X subsample position, in the range [0.0F, 1.0F).yfrac
- the Y subsample position, in the range [0.0F, 1.0F).ArrayIndexOutOfBoundsException
- if xfrac or yfrac are out of bounds.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |