Java Doc for InterpolationTable.java in  » 6.0-JDK-Modules » Java-Advanced-Imaging » javax » media » jai » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules » Java Advanced Imaging » javax.media.jai 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javax.media.jai.Interpolation
      javax.media.jai.InterpolationTable

All known Subclasses:   javax.media.jai.InterpolationBicubic2,  javax.media.jai.InterpolationBicubic,
InterpolationTable
public class InterpolationTable extends Interpolation (Code)
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  intprecisionBits
     The number of fractional bits used to describe filter coefficients.

Constructor Summary
public  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. The kernel data values are organized as 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.
Parameters:
  keyX - The array offset of the horizontal resampling kernel center
Parameters:
  keyY - The array offset of the vertical resampling kernel center
Parameters:
  width - the width of a horizontal resampling kernel.
Parameters:
  height - the height of a vertical resampling kernel.

public  InterpolationTable(int key, int width, int subsampleBits, int precisionBits, int[] data)
     Constructs an InterpolationTable with identical horizontal and vertical resampling kernels.
Parameters:
  key - The array offset of the central sample to be used during resampling.
Parameters:
  width - the width or height of a resampling kernel.
Parameters:
  subsampleBits - the log (base 2) of the number ofsubsample positions.
public  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. The kernel data values are organized as 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.
Parameters:
  keyX - The array offset of the horizontal resampling kernel center
Parameters:
  keyY - The array offset of the vertical resampling kernel center
Parameters:
  width - the width of a horizontal resampling kernel.
Parameters:
  height - the height of a vertical resampling kernel.

public  InterpolationTable(int key, int width, int subsampleBits, int precisionBits, float[] data)
     Constructs an InterpolationTable with identical horizontal and vertical resampling kernels.
Parameters:
  key - The number of samples to the left or above thecentral sample to be used during resampling.
Parameters:
  width - the width or height of a resampling kernel.
Parameters:
  subsampleBits - the log (base 2) of the number ofsubsample positions.
public  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. The kernel data values are organized as 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.
Parameters:
  keyX - The array offset of the horizontal resampling kernel center
Parameters:
  keyY - The array offset of the vertical resampling kernel center
Parameters:
  width - the width of a horizontal resampling kernel.
Parameters:
  height - the height of a vertical resampling kernel.

public  InterpolationTable(int key, int width, int subsampleBits, int precisionBits, double[] data)
     Constructs an InterpolationTable with identical horizontal and vertical resampling kernels.
Parameters:
  key - The number of samples to the left or above thecentral sample to be used during resampling.
Parameters:
  width - the width or height of a resampling kernel.
Parameters:
  subsampleBits - the log (base 2) of the number ofsubsample positions.

Method Summary
public  int[]getHorizontalTableData()
     Returns the integer (fixed-point) horizontal table data.
public  double[]getHorizontalTableDataDouble()
     Returns the double horizontal table data.
public  float[]getHorizontalTableDataFloat()
     Returns the floating-point horizontal table data.
public  intgetPrecisionBits()
     Returns the number of bits of fractional precision used to store the fixed-point table entries.
public  int[]getVerticalTableData()
     Returns the integer (fixed-point) vertical table data.
public  double[]getVerticalTableDataDouble()
     Returns the double vertical table data.
public  float[]getVerticalTableDataFloat()
     Returns the floating-point vertical table data.
public  intinterpolate(int s00, int s01, int s10, int s11, int xfrac, int yfrac)
     Performs interpolation on a 2x2 grid of integral samples. It should only be called if width == height == 2 and keyX == keyY == 0. If xfrac does not lie between 0 and 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.
Parameters:
  s00 - the central sample.
Parameters:
  s01 - the sample to the right of the central sample.
Parameters:
  s10 - the sample below the central sample.
Parameters:
  s11 - the sample below and to the right of the central sample.
Parameters:
  xfrac - the X subsample position, multiplied by 2subsampleBitsH.
Parameters:
  yfrac - the Y subsample position, multiplied by 2subsampleBitsV.
public  intinterpolate(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. It should only be called if width == height == 4 and keyX == keyY == 1. If xfrac does not lie between 0 and 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.
Parameters:
  s__ - the sample above and to the left of the central sample.
Parameters:
  s_0 - the sample above the central sample.
Parameters:
  s_1 - the sample above and one to the right of the central sample.
Parameters:
  s_2 - the sample above and two to the right of the central sample.
Parameters:
  s0_ - the sample to the left of the central sample.
Parameters:
  s00 - the central sample.
Parameters:
  s01 - the sample to the right of the central sample.
Parameters:
  s02 - the sample two to the right of the central sample.
Parameters:
  s1_ - the sample below and one to the left of the central sample.
Parameters:
  s10 - the sample below the central sample.
Parameters:
  s11 - the sample below and one to the right of the central sample.
Parameters:
  s12 - the sample below and two to the right of the central sample.
Parameters:
  s2_ - the sample two below and one to the left of the central sample.
Parameters:
  s20 - the sample two below the central sample.
Parameters:
  s21 - the sample two below and one to the right of the central sample.
Parameters:
  s22 - the sample two below and two to the right of the central sample.
Parameters:
  xfrac - the X subsample position, multiplied by 2subsampleBitsH.
Parameters:
  yfrac - the Y subsample position, multiplied by 2subsampleBitsV.
public  floatinterpolate(float s00, float s01, float s10, float s11, float xfrac, float yfrac)
     Performs interpolation on a 2x2 grid of floating-point samples. It should only be called if width == height == 2 and keyX == keyY == 0. If either xfrac or yfrac does not lie between the range [0.0, 1.0F), an ArrayIndexOutOfBoundsException may occur.
Parameters:
  s00 - the central sample.
Parameters:
  s01 - the sample to the right of the central sample.
Parameters:
  s10 - the sample below the central sample.
Parameters:
  s11 - the sample below and to the right of the central sample.
Parameters:
  xfrac - the X subsample position, in the range [0.0F, 1.0F).
Parameters:
  yfrac - the Y subsample position, in the range [0.0F, 1.0F).
public  floatinterpolate(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. It should only be called if width == height == 4 and keyX == keyY == 1. If either xfrac or yfrac does not lie between the range [0.0, 1.0F), an ArrayIndexOutOfBoundsException may occur.
Parameters:
  s__ - the sample above and to the left of the central sample.
Parameters:
  s_0 - the sample above the central sample.
Parameters:
  s_1 - the sample above and one to the right of the central sample.
Parameters:
  s_2 - the sample above and two to the right of the central sample.
Parameters:
  s0_ - the sample to the left of the central sample.
Parameters:
  s00 - the central sample.
Parameters:
  s01 - the sample to the right of the central sample.
Parameters:
  s02 - the sample two to the right of the central sample.
Parameters:
  s1_ - the sample below and one to the left of the central sample.
Parameters:
  s10 - the sample below the central sample.
Parameters:
  s11 - the sample below and one to the right of the central sample.
Parameters:
  s12 - the sample below and two to the right of the central sample.
Parameters:
  s2_ - the sample two below and one to the left of the central sample.
Parameters:
  s20 - the sample two below the central sample.
Parameters:
  s21 - the sample two below and one to the right of the central sample.
Parameters:
  s22 - the sample two below and two to the right of the central sample.
Parameters:
  xfrac - the X subsample position, in the range [0.0F, 1.0F).
Parameters:
  yfrac - the Y subsample position, in the range [0.0F, 1.0F).
public  doubleinterpolate(double s00, double s01, double s10, double s11, float xfrac, float yfrac)
     Performs interpolation on a 2x2 grid of double samples. It should only be called if width == height == 2 and keyX == keyY == 0. If either xfrac or yfrac does not lie between the range [0.0, 1.0F), an ArrayIndexOutOfBoundsException may occur.
Parameters:
  s00 - the central sample.
Parameters:
  s01 - the sample to the right of the central sample.
Parameters:
  s10 - the sample below the central sample.
Parameters:
  s11 - the sample below and to the right of the central sample.
Parameters:
  xfrac - the X subsample position, in the range [0.0F, 1.0F).
Parameters:
  yfrac - the Y subsample position, in the range [0.0F, 1.0F).
public  doubleinterpolate(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. It should only be called if width == height == 4 and keyX == keyY == 1. If either xfrac or yfrac does not lie between the range [0.0, 1.0F), an ArrayIndexOutOfBoundsException may occur.
Parameters:
  s__ - the sample above and to the left of the central sample.
Parameters:
  s_0 - the sample above the central sample.
Parameters:
  s_1 - the sample above and one to the right of the central sample.
Parameters:
  s_2 - the sample above and two to the right of the central sample.
Parameters:
  s0_ - the sample to the left of the central sample.
Parameters:
  s00 - the central sample.
Parameters:
  s01 - the sample to the right of the central sample.
Parameters:
  s02 - the sample two to the right of the central sample.
Parameters:
  s1_ - the sample below and one to the left of the central sample.
Parameters:
  s10 - the sample below the central sample.
Parameters:
  s11 - the sample below and one to the right of the central sample.
Parameters:
  s12 - the sample below and two to the right of the central sample.
Parameters:
  s2_ - the sample two below and one to the left of the central sample.
Parameters:
  s20 - the sample two below the central sample.
Parameters:
  s21 - the sample two below and one to the right of the central sample.
Parameters:
  s22 - the sample two below and two to the right of the central sample.
Parameters:
  xfrac - the X subsample position, in the range [0.0F, 1.0F).
Parameters:
  yfrac - the Y subsample position, in the range [0.0F, 1.0F).
public  intinterpolateF(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.
public  intinterpolateH(int[] samples, int xfrac)
     Performs horizontal interpolation on a one-dimensional array of integral samples. If xfrac does not lie between 0 and 2subsampleBitsH-1, an ArrayIndexOutOfBoundsException may occur, where width is the width of the horizontal resampling kernel.
Parameters:
  samples - an array of ints.
Parameters:
  xfrac - the subsample position, multiplied by 2subsampleBitsH.
public  intinterpolateH(int s0, int s1, int xfrac)
     Performs horizontal interpolation on a pair of integral samples. This method may be used instead of the array version for speed. It should only be called if width == 2. If xfrac does not lie between 0 and 2subsampleBitsH-1, an ArrayIndexOutOfBoundsException may occur, where width is the width of the horizontal resampling kernel.
Parameters:
  s0 - the central sample.
Parameters:
  s1 - the sample to the right of the central sample.
Parameters:
  xfrac - the subsample position, multiplied by 2subsampleBitsH.
public  intinterpolateH(int s_, int s0, int s1, int s2, int xfrac)
     Performs horizontal interpolation on a quadruple of integral samples. This method may be used instead of the array version for speed. It should only be called if width == 4 and keyX == 1. If xfrac does not lie between 0 and 2subsampleBitsH-1, an ArrayIndexOutOfBoundsException may occur, where width is the width of the horizontal resampling kernel.
Parameters:
  s_ - the sample to the left of the central sample.
Parameters:
  s0 - the central sample.
Parameters:
  s1 - the sample to the right of the central sample.
Parameters:
  s2 - the sample to the right of s1.
Parameters:
  xfrac - the subsample position, multiplied by 2subsampleBitsH.
public  floatinterpolateH(float[] samples, float xfrac)
     Performs horizontal interpolation on a one-dimensional array of floating-point samples representing a row of samples. If xfrac does not lie between the range [0.0, 1.0F), an ArrayIndexOutOfBoundsException may occur.
Parameters:
  samples - an array of floats.
Parameters:
  xfrac - the X subsample position, in the range [0.0F, 1.0F).
public  floatinterpolateH(float s0, float s1, float xfrac)
     Performs horizontal interpolation on a pair of floating-point samples. This method may be used instead of the array version for speed. It should only be called if width == 2. If xfrac does not lie between the range [0.0, 1.0F), an ArrayIndexOutOfBoundsException may occur.
Parameters:
  s0 - the central sample.
Parameters:
  s1 - the sample to the right of the central sample.
Parameters:
  xfrac - the X subsample position, in the range [0.0F, 1.0F).
public  floatinterpolateH(float s_, float s0, float s1, float s2, float xfrac)
     Performs horizontal interpolation on a quadruple of floating-point samples.
public  doubleinterpolateH(double[] samples, float xfrac)
     Performs horizontal interpolation on a one-dimensional array of double samples representing a row of samples. If xfrac does not lie between the range [0.0, 1.0F), an ArrayIndexOutOfBoundsException may occur.
Parameters:
  samples - an array of doubles.
Parameters:
  xfrac - the X subsample position, in the range [0.0F, 1.0F).
public  doubleinterpolateH(double s0, double s1, float xfrac)
     Performs horizontal interpolation on a pair of double samples. This method may be used instead of the array version for speed. It should only be called if width == 2. If xfrac does not lie between the range [0.0, 1.0F), an ArrayIndexOutOfBoundsException may occur.
Parameters:
  s0 - the central sample.
Parameters:
  s1 - the sample to the right of the central sample.
Parameters:
  xfrac - the X subsample position, in the range [0.0F, 1.0F).
public  doubleinterpolateH(double s_, double s0, double s1, double s2, float xfrac)
     Performs horizontal interpolation on a quadruple of double samples.
public  intinterpolateV(int[] samples, int yfrac)
     Performs vertical interpolation on a one-dimensional array of integral samples. If yfrac does not lie between 0 and 2subsampleBitsV-1, an ArrayIndexOutOfBoundsException may occur, where height is the height of the vertical resampling kernel.
Parameters:
  samples - an array of ints.
Parameters:
  yfrac - the Y subsample position, multiplied by 2subsampleBitsV.
public  intinterpolateV(int s0, int s1, int yfrac)
     Performs vertical interpolation on a pair of integral samples. This method may be used instead of the array version for speed. It should only be called if height == 2 and keyY == 0. If yfrac does not lie between 0 and 2subsampleBitsV-1, an ArrayIndexOutOfBoundsException may occur, where height is the height of the vertical resampling kernel.
Parameters:
  s0 - the central sample.
Parameters:
  s1 - the sample below the central sample.
Parameters:
  yfrac - the Y subsample position, multiplied by 2subsampleBitsV.
public  intinterpolateV(int s_, int s0, int s1, int s2, int yfrac)
     Performs vertical interpolation on a quadruple of integral samples. This method may be used instead of the array version for speed. It should only be called if height == 4 and keyY == 1. If yfrac does not lie between 0 and 2subsampleBitsV-1, an ArrayIndexOutOfBoundsException may occur, where height is the height of the vertical resampling kernel.
Parameters:
  s_ - the sample above the central sample.
Parameters:
  s0 - the central sample.
Parameters:
  s1 - the sample below the central sample.
Parameters:
  s2 - the sample below s1.
Parameters:
  yfrac - the Y subsample position, multiplied by 2subsampleBitsV.
public  floatinterpolateV(float[] samples, float yfrac)
     Performs vertical interpolation on a one-dimensional array of floating-point samples representing a column of samples. If yfrac does not lie between the range [0.0, 1.0F), an ArrayIndexOutOfBoundsException may occur.
Parameters:
  samples - an array of floats.
Parameters:
  yfrac - the Y subsample position, in the range [0.0F, 1.0F).
public  floatinterpolateV(float s0, float s1, float yfrac)
     Performs vertical interpolation on a pair of floating-point samples. This method may be used instead of the array version for speed. It should only be called if height == 2 and keyY == 0. If yfrac does not lie between the range [0.0, 1.0F), an ArrayIndexOutOfBoundsException may occur.
Parameters:
  s0 - the central sample.
Parameters:
  s1 - the sample below the central sample.
Parameters:
  yfrac - the Y subsample position, in the range [0.0F, 1.0F).
public  floatinterpolateV(float s_, float s0, float s1, float s2, float yfrac)
     Performs vertical interpolation on a quadruple of floating-point samples.
public  doubleinterpolateV(double[] samples, float yfrac)
     Performs vertical interpolation on a one-dimensional array of double samples representing a column of samples. If yfrac does not lie between the range [0.0, 1.0F), an ArrayIndexOutOfBoundsException may occur.
Parameters:
  samples - an array of doubles.
Parameters:
  yfrac - the Y subsample position, in the range [0.0F, 1.0F).
public  doubleinterpolateV(double s0, double s1, float yfrac)
     Performs vertical interpolation on a pair of double samples. This method may be used instead of the array version for speed. It should only be called if height == 2 and keyY == 0. If yfrac does not lie between the range [0.0, 1.0F), an ArrayIndexOutOfBoundsException may occur.
Parameters:
  s0 - the central sample.
Parameters:
  s1 - the sample below the central sample.
Parameters:
  yfrac - the Y subsample position, in the range [0.0F, 1.0F).
public  doubleinterpolateV(double s_, double s0, double s1, double s2, float yfrac)
     Performs vertical interpolation on a quadruple of double samples.

Field Detail
dataHd
protected double[] dataHd(Code)
The horizontal coefficient data in double format.



dataHf
protected float[] dataHf(Code)
The horizontal coefficient data in floating-point format.



dataHi
protected int[] dataHi(Code)
The horizontal coefficient data in fixed-point format.



dataVd
protected double[] dataVd(Code)
The vertical coefficient data in double format.



dataVf
protected float[] dataVf(Code)
The vertical coefficient data in floating-point format.



dataVi
protected int[] dataVi(Code)
The vertical coefficient data in fixed-point format.



precisionBits
protected int precisionBits(Code)
The number of fractional bits used to describe filter coefficients.




Constructor Detail
InterpolationTable
public InterpolationTable(int keyX, int keyY, int width, int height, int subsampleBitsH, int subsampleBitsV, int precisionBits, int[] dataH, int[] dataV)(Code)
Constructs an InterpolationTable with specified horizontal and vertical extents (support), number of horizontal and vertical bins, fixed-point fractional precision, and int kernel entries. The kernel data values are organized as 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.
Parameters:
  keyX - The array offset of the horizontal resampling kernel center
Parameters:
  keyY - The array offset of the vertical resampling kernel center
Parameters:
  width - the width of a horizontal resampling kernel.
Parameters:
  height - the height of a vertical resampling kernel. Ignoredif dataV is null.
Parameters:
  subsampleBitsH - the log (base 2) of the number of horizontalsubsample positions. Must be positive.
Parameters:
  subsampleBitsV - the log (base 2) of the number of verticalsubsample positions. Must be positive. Ignored if dataV is null.
Parameters:
  precisionBits - the number of bits of fractional precisionto be used when resampling integral sample values. Must be positive.The same value is used for both horizontal and verticalresampling.
Parameters:
  dataH - the horizontal table entries, as an int array of2subsampleBitsH entries each of length width. The array is cloned internally.
Parameters:
  dataV - the vertical table entries, as an int array of2subsampleBitsV entries each of length height, or null. The array is cloned internally.If null, the dataH table is used for vertical interpolationas well and the keyY, height, and subsampleBitsVparameters are ignored.
throws:
  IllegalArgumentException - if the size of the data arraysare incorrect.




InterpolationTable
public InterpolationTable(int key, int width, int subsampleBits, int precisionBits, int[] data)(Code)
Constructs an InterpolationTable with identical horizontal and vertical resampling kernels.
Parameters:
  key - The array offset of the central sample to be used during resampling.
Parameters:
  width - the width or height of a resampling kernel.
Parameters:
  subsampleBits - the log (base 2) of the number ofsubsample positions. Must be positive.
Parameters:
  precisionBits - the number of bits of fractional precisionto be used when resampling integral sample values. Must be positive.
Parameters:
  data - the kernel entries, as an int array ofwidth*2subsampleBits entries



InterpolationTable
public InterpolationTable(int keyX, int keyY, int width, int height, int subsampleBitsH, int subsampleBitsV, int precisionBits, float[] dataH, float[] dataV)(Code)
Constructs an InterpolationTable with specified horizontal and vertical extents (support), number of horizontal and vertical bins, fixed-point fractional precision, and float kernel entries. The kernel data values are organized as 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.
Parameters:
  keyX - The array offset of the horizontal resampling kernel center
Parameters:
  keyY - The array offset of the vertical resampling kernel center
Parameters:
  width - the width of a horizontal resampling kernel.
Parameters:
  height - the height of a vertical resampling kernel. Ignoredif dataV is null.
Parameters:
  subsampleBitsH - the log (base 2) of the number of horizontalsubsample positions. Must be positive.
Parameters:
  subsampleBitsV - the log (base 2) of the number of verticalsubsample positions. Must be positive. Ignored if dataV is null.
Parameters:
  precisionBits - the number of bits of fractional precisionto be used when resampling integral sample values.The same value is used for both horizontal and verticalresampling. Must be positive.
Parameters:
  dataH - the horizontal table entries, as a float array of2subsampleBitsH entries each of length width.
Parameters:
  dataV - the vertical table entries, as a float array of2subsampleBitsV entries each of length height, or null.If null, the dataH table is used for vertical interpolationas well and the keyY, height, and subsampleBitsVparameters are ignored.
throws:
  IllegalArgumentException - if the size of the data arraysare incorrect.




InterpolationTable
public InterpolationTable(int key, int width, int subsampleBits, int precisionBits, float[] data)(Code)
Constructs an InterpolationTable with identical horizontal and vertical resampling kernels.
Parameters:
  key - The number of samples to the left or above thecentral sample to be used during resampling.
Parameters:
  width - the width or height of a resampling kernel.
Parameters:
  subsampleBits - the log (base 2) of the number ofsubsample positions. Must be positive.
Parameters:
  precisionBits - the number of bits of fractional precisionto be used when resampling integral sample values. Must be positive.
Parameters:
  data - the kernel entries, as a float array ofwidth*2subsampleBits entries



InterpolationTable
public InterpolationTable(int keyX, int keyY, int width, int height, int subsampleBitsH, int subsampleBitsV, int precisionBits, double[] dataH, double[] dataV)(Code)
Constructs an InterpolationTable with specified horizontal and vertical extents (support), number of horizontal and vertical bins, fixed-point fractional precision, and double kernel entries. The kernel data values are organized as 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.
Parameters:
  keyX - The array offset of the horizontal resampling kernel center
Parameters:
  keyY - The array offset of the vertical resampling kernel center
Parameters:
  width - the width of a horizontal resampling kernel.
Parameters:
  height - the height of a vertical resampling kernel. Ignoredif dataV is null.
Parameters:
  subsampleBitsH - the log (base 2) of the number of horizontalsubsample positions. Must be positive.
Parameters:
  subsampleBitsV - the log (base 2) of the number of verticalsubsample positions. Must be positive. Ignored if dataV is null.
Parameters:
  precisionBits - the number of bits of fractional precisionto be used when resampling integral sample values.The same value is used for both horizontal and verticalresampling. Must be positive.
Parameters:
  dataH - the horizontal table entries, as a double array of2subsampleBitsH entries each of length width.
Parameters:
  dataV - the vertical table entries, as a double array of2subsampleBitsV entries each of length height, or null.If null, the dataH table is used for vertical interpolationas well and the keyY, height, and subsampleBitsVparameters are ignored.




InterpolationTable
public InterpolationTable(int key, int width, int subsampleBits, int precisionBits, double[] data)(Code)
Constructs an InterpolationTable with identical horizontal and vertical resampling kernels.
Parameters:
  key - The number of samples to the left or above thecentral sample to be used during resampling.
Parameters:
  width - the width or height of a resampling kernel.
Parameters:
  subsampleBits - the log (base 2) of the number ofsubsample positions. Must be positive.
Parameters:
  precisionBits - the number of bits of fractional precisionto be used when resampling integral sample values. Must be positive.
Parameters:
  data - the kernel entries, as a double array ofwidth*2subsampleBitsH entries




Method Detail
getHorizontalTableData
public int[] getHorizontalTableData()(Code)
Returns the integer (fixed-point) horizontal table data. The output is an 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. An array of ints.




getHorizontalTableDataDouble
public double[] getHorizontalTableDataDouble()(Code)
Returns the double horizontal table data. The output is a 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. An array of doubles.




getHorizontalTableDataFloat
public float[] getHorizontalTableDataFloat()(Code)
Returns the floating-point horizontal table data. The output is a 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. An array of floats.




getPrecisionBits
public int getPrecisionBits()(Code)
Returns the number of bits of fractional precision used to store the fixed-point table entries.



getVerticalTableData
public int[] getVerticalTableData()(Code)
Returns the integer (fixed-point) vertical table data. The output is an 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. An array of ints.




getVerticalTableDataDouble
public double[] getVerticalTableDataDouble()(Code)
Returns the double vertical table data. The output is a 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. An array of doubles.




getVerticalTableDataFloat
public float[] getVerticalTableDataFloat()(Code)
Returns the floating-point vertical table data. The output is a 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. An array of floats.




interpolate
public int interpolate(int s00, int s01, int s10, int s11, int xfrac, int yfrac)(Code)
Performs interpolation on a 2x2 grid of integral samples. It should only be called if width == height == 2 and keyX == keyY == 0. If xfrac does not lie between 0 and 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.
Parameters:
  s00 - the central sample.
Parameters:
  s01 - the sample to the right of the central sample.
Parameters:
  s10 - the sample below the central sample.
Parameters:
  s11 - the sample below and to the right of the central sample.
Parameters:
  xfrac - the X subsample position, multiplied by 2subsampleBitsH.
Parameters:
  yfrac - the Y subsample position, multiplied by 2subsampleBitsV. the interpolated value as an int.
throws:
  ArrayIndexOutOfBoundsException - if xfrac or yfrac are out of bounds.



interpolate
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)(Code)
Performs interpolation on a 4x4 grid of integral samples. It should only be called if width == height == 4 and keyX == keyY == 1. If xfrac does not lie between 0 and 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.
Parameters:
  s__ - the sample above and to the left of the central sample.
Parameters:
  s_0 - the sample above the central sample.
Parameters:
  s_1 - the sample above and one to the right of the central sample.
Parameters:
  s_2 - the sample above and two to the right of the central sample.
Parameters:
  s0_ - the sample to the left of the central sample.
Parameters:
  s00 - the central sample.
Parameters:
  s01 - the sample to the right of the central sample.
Parameters:
  s02 - the sample two to the right of the central sample.
Parameters:
  s1_ - the sample below and one to the left of the central sample.
Parameters:
  s10 - the sample below the central sample.
Parameters:
  s11 - the sample below and one to the right of the central sample.
Parameters:
  s12 - the sample below and two to the right of the central sample.
Parameters:
  s2_ - the sample two below and one to the left of the central sample.
Parameters:
  s20 - the sample two below the central sample.
Parameters:
  s21 - the sample two below and one to the right of the central sample.
Parameters:
  s22 - the sample two below and two to the right of the central sample.
Parameters:
  xfrac - the X subsample position, multiplied by 2subsampleBitsH.
Parameters:
  yfrac - the Y subsample position, multiplied by 2subsampleBitsV. the interpolated value as an int.
throws:
  ArrayIndexOutOfBoundsException - if xfrac or yfrac are out of bounds.



interpolate
public float interpolate(float s00, float s01, float s10, float s11, float xfrac, float yfrac)(Code)
Performs interpolation on a 2x2 grid of floating-point samples. It should only be called if width == height == 2 and keyX == keyY == 0. If either xfrac or yfrac does not lie between the range [0.0, 1.0F), an ArrayIndexOutOfBoundsException may occur.
Parameters:
  s00 - the central sample.
Parameters:
  s01 - the sample to the right of the central sample.
Parameters:
  s10 - the sample below the central sample.
Parameters:
  s11 - the sample below and to the right of the central sample.
Parameters:
  xfrac - the X subsample position, in the range [0.0F, 1.0F).
Parameters:
  yfrac - the Y subsample position, in the range [0.0F, 1.0F). the interpolated value as a float.
throws:
  ArrayIndexOutOfBoundsException - if xfrac or yfrac are out of bounds.



interpolate
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)(Code)
Performs interpolation on a 4x4 grid of floating-point samples. It should only be called if width == height == 4 and keyX == keyY == 1. If either xfrac or yfrac does not lie between the range [0.0, 1.0F), an ArrayIndexOutOfBoundsException may occur.
Parameters:
  s__ - the sample above and to the left of the central sample.
Parameters:
  s_0 - the sample above the central sample.
Parameters:
  s_1 - the sample above and one to the right of the central sample.
Parameters:
  s_2 - the sample above and two to the right of the central sample.
Parameters:
  s0_ - the sample to the left of the central sample.
Parameters:
  s00 - the central sample.
Parameters:
  s01 - the sample to the right of the central sample.
Parameters:
  s02 - the sample two to the right of the central sample.
Parameters:
  s1_ - the sample below and one to the left of the central sample.
Parameters:
  s10 - the sample below the central sample.
Parameters:
  s11 - the sample below and one to the right of the central sample.
Parameters:
  s12 - the sample below and two to the right of the central sample.
Parameters:
  s2_ - the sample two below and one to the left of the central sample.
Parameters:
  s20 - the sample two below the central sample.
Parameters:
  s21 - the sample two below and one to the right of the central sample.
Parameters:
  s22 - the sample two below and two to the right of the central sample.
Parameters:
  xfrac - the X subsample position, in the range [0.0F, 1.0F).
Parameters:
  yfrac - the Y subsample position, in the range [0.0F, 1.0F). the interpolated value as a float.
throws:
  ArrayIndexOutOfBoundsException - if xfrac or yfrac are out of bounds.



interpolate
public double interpolate(double s00, double s01, double s10, double s11, float xfrac, float yfrac)(Code)
Performs interpolation on a 2x2 grid of double samples. It should only be called if width == height == 2 and keyX == keyY == 0. If either xfrac or yfrac does not lie between the range [0.0, 1.0F), an ArrayIndexOutOfBoundsException may occur.
Parameters:
  s00 - the central sample.
Parameters:
  s01 - the sample to the right of the central sample.
Parameters:
  s10 - the sample below the central sample.
Parameters:
  s11 - the sample below and to the right of the central sample.
Parameters:
  xfrac - the X subsample position, in the range [0.0F, 1.0F).
Parameters:
  yfrac - the Y subsample position, in the range [0.0F, 1.0F). the interpolated value as a double.
throws:
  ArrayIndexOutOfBoundsException - if xfrac or yfrac are out of bounds.



interpolate
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)(Code)
Performs interpolation on a 4x4 grid of double samples. It should only be called if width == height == 4 and keyX == keyY == 1. If either xfrac or yfrac does not lie between the range [0.0, 1.0F), an ArrayIndexOutOfBoundsException may occur.
Parameters:
  s__ - the sample above and to the left of the central sample.
Parameters:
  s_0 - the sample above the central sample.
Parameters:
  s_1 - the sample above and one to the right of the central sample.
Parameters:
  s_2 - the sample above and two to the right of the central sample.
Parameters:
  s0_ - the sample to the left of the central sample.
Parameters:
  s00 - the central sample.
Parameters:
  s01 - the sample to the right of the central sample.
Parameters:
  s02 - the sample two to the right of the central sample.
Parameters:
  s1_ - the sample below and one to the left of the central sample.
Parameters:
  s10 - the sample below the central sample.
Parameters:
  s11 - the sample below and one to the right of the central sample.
Parameters:
  s12 - the sample below and two to the right of the central sample.
Parameters:
  s2_ - the sample two below and one to the left of the central sample.
Parameters:
  s20 - the sample two below the central sample.
Parameters:
  s21 - the sample two below and one to the right of the central sample.
Parameters:
  s22 - the sample two below and two to the right of the central sample.
Parameters:
  xfrac - the X subsample position, in the range [0.0F, 1.0F).
Parameters:
  yfrac - the Y subsample position, in the range [0.0F, 1.0F). the interpolated value as a double.
throws:
  ArrayIndexOutOfBoundsException - if xfrac or yfrac are out of bounds.



interpolateF
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)(Code)
Performs interpolation on a 4x4 grid of integral samples. All internal calculations are performed in floating-point. It should only be called if width == height == 4 and keyX == keyY == 1. If xfrac does not lie between 0 and 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.
Parameters:
  s__ - the sample above and to the left of the central sample.
Parameters:
  s_0 - the sample above the central sample.
Parameters:
  s_1 - the sample above and one to the right of the central sample.
Parameters:
  s_2 - the sample above and two to the right of the central sample.
Parameters:
  s0_ - the sample to the left of the central sample.
Parameters:
  s00 - the central sample.
Parameters:
  s01 - the sample to the right of the central sample.
Parameters:
  s02 - the sample two to the right of the central sample.
Parameters:
  s1_ - the sample below and one to the left of the central sample.
Parameters:
  s10 - the sample below the central sample.
Parameters:
  s11 - the sample below and one to the right of the central sample.
Parameters:
  s12 - the sample below and two to the right of the central sample.
Parameters:
  s2_ - the sample two below and one to the left of the central sample.
Parameters:
  s20 - the sample two below the central sample.
Parameters:
  s21 - the sample two below and one to the right of the central sample.
Parameters:
  s22 - the sample two below and two to the right of the central sample.
Parameters:
  xfrac - the X subsample position, multiplied by 2subsampleBitsH.
Parameters:
  yfrac - the Y subsample position, multiplied by 2subsampleBitsV. the interpolated value as an int.
throws:
  ArrayIndexOutOfBoundsException - if xfrac or yfrac are out of bounds.



interpolateH
public int interpolateH(int[] samples, int xfrac)(Code)
Performs horizontal interpolation on a one-dimensional array of integral samples. If xfrac does not lie between 0 and 2subsampleBitsH-1, an ArrayIndexOutOfBoundsException may occur, where width is the width of the horizontal resampling kernel.
Parameters:
  samples - an array of ints.
Parameters:
  xfrac - the subsample position, multiplied by 2subsampleBitsH. the interpolated value as an int.
throws:
  ArrayIndexOutOfBoundsException - if xfrac is out of bounds.



interpolateH
public int interpolateH(int s0, int s1, int xfrac)(Code)
Performs horizontal interpolation on a pair of integral samples. This method may be used instead of the array version for speed. It should only be called if width == 2. If xfrac does not lie between 0 and 2subsampleBitsH-1, an ArrayIndexOutOfBoundsException may occur, where width is the width of the horizontal resampling kernel.
Parameters:
  s0 - the central sample.
Parameters:
  s1 - the sample to the right of the central sample.
Parameters:
  xfrac - the subsample position, multiplied by 2subsampleBitsH. the interpolated value as an int.
throws:
  ArrayIndexOutOfBoundsException - if xfrac is out of bounds.



interpolateH
public int interpolateH(int s_, int s0, int s1, int s2, int xfrac)(Code)
Performs horizontal interpolation on a quadruple of integral samples. This method may be used instead of the array version for speed. It should only be called if width == 4 and keyX == 1. If xfrac does not lie between 0 and 2subsampleBitsH-1, an ArrayIndexOutOfBoundsException may occur, where width is the width of the horizontal resampling kernel.
Parameters:
  s_ - the sample to the left of the central sample.
Parameters:
  s0 - the central sample.
Parameters:
  s1 - the sample to the right of the central sample.
Parameters:
  s2 - the sample to the right of s1.
Parameters:
  xfrac - the subsample position, multiplied by 2subsampleBitsH. the interpolated value as an int.
throws:
  ArrayIndexOutOfBoundsException - if xfrac is out of bounds.



interpolateH
public float interpolateH(float[] samples, float xfrac)(Code)
Performs horizontal interpolation on a one-dimensional array of floating-point samples representing a row of samples. If xfrac does not lie between the range [0.0, 1.0F), an ArrayIndexOutOfBoundsException may occur.
Parameters:
  samples - an array of floats.
Parameters:
  xfrac - the X subsample position, in the range [0.0F, 1.0F). the interpolated value as a float.
throws:
  ArrayIndexOutOfBoundsException - if xfrac is out of bounds.



interpolateH
public float interpolateH(float s0, float s1, float xfrac)(Code)
Performs horizontal interpolation on a pair of floating-point samples. This method may be used instead of the array version for speed. It should only be called if width == 2. If xfrac does not lie between the range [0.0, 1.0F), an ArrayIndexOutOfBoundsException may occur.
Parameters:
  s0 - the central sample.
Parameters:
  s1 - the sample to the right of the central sample.
Parameters:
  xfrac - the X subsample position, in the range [0.0F, 1.0F). the interpolated value as a float.
throws:
  ArrayIndexOutOfBoundsException - if xfrac is out of bounds.



interpolateH
public float interpolateH(float s_, float s0, float s1, float s2, float xfrac)(Code)
Performs horizontal interpolation on a quadruple of floating-point samples. This method may be used instead of the array version for speed. It should only be called if width == 4 and keyX == 1. If xfrac does not lie between the range [0.0, 1.0F), an ArrayIndexOutOfBoundsException may occur.
Parameters:
  s_ - the sample to the left of the central sample.
Parameters:
  s0 - the central sample.
Parameters:
  s1 - the sample to the right of the central sample.
Parameters:
  s2 - the sample to the right of s1.
Parameters:
  xfrac - the X subsample position, in the range [0.0F, 1.0F). the interpolated value as a float.
throws:
  ArrayIndexOutOfBoundsException - if xfrac is out of bounds.



interpolateH
public double interpolateH(double[] samples, float xfrac)(Code)
Performs horizontal interpolation on a one-dimensional array of double samples representing a row of samples. If xfrac does not lie between the range [0.0, 1.0F), an ArrayIndexOutOfBoundsException may occur.
Parameters:
  samples - an array of doubles.
Parameters:
  xfrac - the X subsample position, in the range [0.0F, 1.0F). the interpolated value as a double.
throws:
  ArrayIndexOutOfBoundsException - if xfrac is out of bounds.



interpolateH
public double interpolateH(double s0, double s1, float xfrac)(Code)
Performs horizontal interpolation on a pair of double samples. This method may be used instead of the array version for speed. It should only be called if width == 2. If xfrac does not lie between the range [0.0, 1.0F), an ArrayIndexOutOfBoundsException may occur.
Parameters:
  s0 - the central sample.
Parameters:
  s1 - the sample to the right of the central sample.
Parameters:
  xfrac - the X subsample position, in the range [0.0F, 1.0F). the interpolated value as a double.
throws:
  ArrayIndexOutOfBoundsException - if xfrac is out of bounds.



interpolateH
public double interpolateH(double s_, double s0, double s1, double s2, float xfrac)(Code)
Performs horizontal interpolation on a quadruple of double samples. This method may be used instead of the array version for speed. It should only be called if width == 4 and keyX == 1. If xfrac does not lie between the range [0.0, 1.0F), an ArrayIndexOutOfBoundsException may occur.
Parameters:
  s_ - the sample to the left of the central sample.
Parameters:
  s0 - the central sample.
Parameters:
  s1 - the sample to the right of the central sample.
Parameters:
  s2 - the sample to the right of s1.
Parameters:
  xfrac - the X subsample position, in the range [0.0F, 1.0F). the interpolated value as a double.
throws:
  ArrayIndexOutOfBoundsException - if xfrac is out of bounds.



interpolateV
public int interpolateV(int[] samples, int yfrac)(Code)
Performs vertical interpolation on a one-dimensional array of integral samples. If yfrac does not lie between 0 and 2subsampleBitsV-1, an ArrayIndexOutOfBoundsException may occur, where height is the height of the vertical resampling kernel.
Parameters:
  samples - an array of ints.
Parameters:
  yfrac - the Y subsample position, multiplied by 2subsampleBitsV. the interpolated value as an int.
throws:
  ArrayIndexOutOfBoundsException - if yfrac is out of bounds.



interpolateV
public int interpolateV(int s0, int s1, int yfrac)(Code)
Performs vertical interpolation on a pair of integral samples. This method may be used instead of the array version for speed. It should only be called if height == 2 and keyY == 0. If yfrac does not lie between 0 and 2subsampleBitsV-1, an ArrayIndexOutOfBoundsException may occur, where height is the height of the vertical resampling kernel.
Parameters:
  s0 - the central sample.
Parameters:
  s1 - the sample below the central sample.
Parameters:
  yfrac - the Y subsample position, multiplied by 2subsampleBitsV. the interpolated value as an int.
throws:
  ArrayIndexOutOfBoundsException - if yfrac is out of bounds.



interpolateV
public int interpolateV(int s_, int s0, int s1, int s2, int yfrac)(Code)
Performs vertical interpolation on a quadruple of integral samples. This method may be used instead of the array version for speed. It should only be called if height == 4 and keyY == 1. If yfrac does not lie between 0 and 2subsampleBitsV-1, an ArrayIndexOutOfBoundsException may occur, where height is the height of the vertical resampling kernel.
Parameters:
  s_ - the sample above the central sample.
Parameters:
  s0 - the central sample.
Parameters:
  s1 - the sample below the central sample.
Parameters:
  s2 - the sample below s1.
Parameters:
  yfrac - the Y subsample position, multiplied by 2subsampleBitsV. the interpolated value as an int.
throws:
  ArrayIndexOutOfBoundsException - if yfrac is out of bounds.



interpolateV
public float interpolateV(float[] samples, float yfrac)(Code)
Performs vertical interpolation on a one-dimensional array of floating-point samples representing a column of samples. If yfrac does not lie between the range [0.0, 1.0F), an ArrayIndexOutOfBoundsException may occur.
Parameters:
  samples - an array of floats.
Parameters:
  yfrac - the Y subsample position, in the range [0.0F, 1.0F). the interpolated value as a float.
throws:
  ArrayIndexOutOfBoundsException - if yfrac is out of bounds.



interpolateV
public float interpolateV(float s0, float s1, float yfrac)(Code)
Performs vertical interpolation on a pair of floating-point samples. This method may be used instead of the array version for speed. It should only be called if height == 2 and keyY == 0. If yfrac does not lie between the range [0.0, 1.0F), an ArrayIndexOutOfBoundsException may occur.
Parameters:
  s0 - the central sample.
Parameters:
  s1 - the sample below the central sample.
Parameters:
  yfrac - the Y subsample position, in the range [0.0F, 1.0F). the interpolated value as a float.
throws:
  ArrayIndexOutOfBoundsException - if yfrac is out of bounds.



interpolateV
public float interpolateV(float s_, float s0, float s1, float s2, float yfrac)(Code)
Performs vertical interpolation on a quadruple of floating-point samples. This method may be used instead of the array version for speed. It should only be called if height == 4 and keyY == 1. If yfrac does not lie between the range [0.0, 1.0F), an ArrayIndexOutOfBoundsException may occur.
Parameters:
  s_ - the sample above the central sample.
Parameters:
  s0 - the central sample.
Parameters:
  s1 - the sample below the central sample.
Parameters:
  s2 - the sample below s1.
Parameters:
  yfrac - the Y subsample position, in the range [0.0F, 1.0F). the interpolated value as a float.
throws:
  ArrayIndexOutOfBoundsException - if yfrac is out of bounds.



interpolateV
public double interpolateV(double[] samples, float yfrac)(Code)
Performs vertical interpolation on a one-dimensional array of double samples representing a column of samples. If yfrac does not lie between the range [0.0, 1.0F), an ArrayIndexOutOfBoundsException may occur.
Parameters:
  samples - an array of doubles.
Parameters:
  yfrac - the Y subsample position, in the range [0.0F, 1.0F). the interpolated value as a double.
throws:
  ArrayIndexOutOfBoundsException - if yfrac is out of bounds.



interpolateV
public double interpolateV(double s0, double s1, float yfrac)(Code)
Performs vertical interpolation on a pair of double samples. This method may be used instead of the array version for speed. It should only be called if height == 2 and keyY == 0. If yfrac does not lie between the range [0.0, 1.0F), an ArrayIndexOutOfBoundsException may occur.
Parameters:
  s0 - the central sample.
Parameters:
  s1 - the sample below the central sample.
Parameters:
  yfrac - the Y subsample position, in the range [0.0F, 1.0F). the interpolated value as a double.
throws:
  ArrayIndexOutOfBoundsException - if yfrac is out of bounds.



interpolateV
public double interpolateV(double s_, double s0, double s1, double s2, float yfrac)(Code)
Performs vertical interpolation on a quadruple of double samples. This method may be used instead of the array version for speed. It should only be called if height == 4 and keyY == 1. If yfrac does not lie between the range [0.0, 1.0F), an ArrayIndexOutOfBoundsException may occur.
Parameters:
  s_ - the sample above the central sample.
Parameters:
  s0 - the central sample.
Parameters:
  s1 - the sample below the central sample.
Parameters:
  s2 - the sample below s1.
Parameters:
  yfrac - the Y subsample position, in the range [0.0F, 1.0F). the interpolated value as a double.
throws:
  ArrayIndexOutOfBoundsException - if yfrac is out of bounds.



Fields inherited from javax.media.jai.Interpolation
final public static int INTERP_BICUBIC(Code)(Java Doc)
final public static int INTERP_BICUBIC_2(Code)(Java Doc)
final public static int INTERP_BILINEAR(Code)(Java Doc)
final public static int INTERP_NEAREST(Code)(Java Doc)
protected int bottomPadding(Code)(Java Doc)
protected int height(Code)(Java Doc)
protected int leftPadding(Code)(Java Doc)
protected int rightPadding(Code)(Java Doc)
protected int subsampleBitsH(Code)(Java Doc)
protected int subsampleBitsV(Code)(Java Doc)
protected int topPadding(Code)(Java Doc)
protected int width(Code)(Java Doc)

Methods inherited from javax.media.jai.Interpolation
public int getBottomPadding()(Code)(Java Doc)
public int getHeight()(Code)(Java Doc)
public static synchronized Interpolation getInstance(int type)(Code)(Java Doc)
public int getLeftPadding()(Code)(Java Doc)
public int getRightPadding()(Code)(Java Doc)
public int getSubsampleBitsH()(Code)(Java Doc)
public int getSubsampleBitsV()(Code)(Java Doc)
public int getTopPadding()(Code)(Java Doc)
public int getWidth()(Code)(Java Doc)
public int interpolate(int[][] samples, int xfrac, int yfrac)(Code)(Java Doc)
public int interpolate(int s00, int s01, int s10, int s11, int xfrac, int yfrac)(Code)(Java Doc)
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)(Code)(Java Doc)
public float interpolate(float[][] samples, float xfrac, float yfrac)(Code)(Java Doc)
public float interpolate(float s00, float s01, float s10, float s11, float xfrac, float yfrac)(Code)(Java Doc)
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)(Code)(Java Doc)
public double interpolate(double[][] samples, float xfrac, float yfrac)(Code)(Java Doc)
public double interpolate(double s00, double s01, double s10, double s11, float xfrac, float yfrac)(Code)(Java Doc)
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)(Code)(Java Doc)
abstract public int interpolateH(int[] samples, int xfrac)(Code)(Java Doc)
public int interpolateH(int s0, int s1, int xfrac)(Code)(Java Doc)
public int interpolateH(int s_, int s0, int s1, int s2, int xfrac)(Code)(Java Doc)
abstract public float interpolateH(float[] samples, float xfrac)(Code)(Java Doc)
public float interpolateH(float s0, float s1, float xfrac)(Code)(Java Doc)
public float interpolateH(float s_, float s0, float s1, float s2, float xfrac)(Code)(Java Doc)
abstract public double interpolateH(double[] samples, float xfrac)(Code)(Java Doc)
public double interpolateH(double s0, double s1, float xfrac)(Code)(Java Doc)
public double interpolateH(double s_, double s0, double s1, double s2, float xfrac)(Code)(Java Doc)
public int interpolateV(int[] samples, int yfrac)(Code)(Java Doc)
public int interpolateV(int s0, int s1, int yfrac)(Code)(Java Doc)
public int interpolateV(int s_, int s0, int s1, int s2, int yfrac)(Code)(Java Doc)
public float interpolateV(float[] samples, float yfrac)(Code)(Java Doc)
public float interpolateV(float s0, float s1, float yfrac)(Code)(Java Doc)
public float interpolateV(float s_, float s0, float s1, float s2, float yfrac)(Code)(Java Doc)
public double interpolateV(double[] samples, float yfrac)(Code)(Java Doc)
public double interpolateV(double s0, double s1, float yfrac)(Code)(Java Doc)
public double interpolateV(double s_, double s0, double s1, double s2, float yfrac)(Code)(Java Doc)
public boolean isSeparable()(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.