Java Doc for InterpolationNearest.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.InterpolationNearest

InterpolationNearest
final public class InterpolationNearest extends Interpolation (Code)
A class representing nearest-neighbor interpolation. Since nearest-neighbor interpolation is simply pixel copying, and not really interpolation at all, most code that performs nearest-neighbor sampling will want to use special-purpose code. However, this class is provided both as a way to specify such interpolation, with the consumer making use of 'instanceof' to detect the particular class, and as a way to force general Interpolation users to use nearest-neighbor sampling. Note that this interpolator does not actually select the "nearest" pixel, but only uses the truncated integer pixel location (floor). This is an optimization reflecting an assumption about the implementation of the resampler. It is assumed that the conversion of continuous source image coordinates to discrete pixel indices drops the final subtraction of 0.5 for the case of a nearest-neighbor interpolator.

Neighborhoods of sizes 2x1, 1x2, 2x2, 4x1, 1x4, 4x4, Nx1 and 1xN, that is, all the interpolate() methods defined in the Interpolation class, are supported in the interest of simplifying code that handles a number of types of interpolation. In each case, the central sample is returned and the rest are ignored.

The class is marked 'final' so that it may be more easily inlined.




Constructor Summary
public  InterpolationNearest()
     Constructs an InterpolationNearest.

Method Summary
public  intinterpolate(int[][] samples, int xfrac, int yfrac)
     Performs interpolation on a two-dimensional array of integral samples.
public  intinterpolate(int s00, int s01, int s10, int s11, int xfrac, int yfrac)
     Performs interpolation on a 2x2 grid of integral samples.
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.
public  floatinterpolate(float[][] samples, float xfrac, float yfrac)
     Performs interpolation on a two-dimensional array of floating-point samples.
public  floatinterpolate(float s00, float s01, float s10, float s11, float xfrac, float yfrac)
     Performs interpolation on a 2x2 grid of floating-point samples.
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.
public  doubleinterpolate(double[][] samples, float xfrac, float yfrac)
     Performs interpolation on a two-dimensional array of double samples.
public  doubleinterpolate(double s00, double s01, double s10, double s11, float xfrac, float yfrac)
     Performs interpolation on a 2x2 grid of double samples.
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.
public  intinterpolateH(int[] samples, int xfrac)
     Performs horizontal interpolation on a one-dimensional array of integral samples.
public  intinterpolateH(int s0, int s1, int xfrac)
     Performs horizontal interpolation on a pair of integral samples.
public  floatinterpolateH(float[] samples, float xfrac)
     Performs horizontal interpolation on a one-dimensional array of floating-point samples.
public  floatinterpolateH(float s0, float s1, float xfrac)
     Performs horizontal interpolation on a pair of floating-point samples.
public  doubleinterpolateH(double[] samples, float xfrac)
     Performs horizontal interpolation on a one-dimensional array of double samples.
public  doubleinterpolateH(double s0, double s1, float xfrac)
     Performs horizontal interpolation on a pair of double samples.
public  intinterpolateV(int[] samples, int yfrac)
     Performs vertical interpolation on a one-dimensional array of integral samples.
public  intinterpolateV(int s0, int s1, int yfrac)
     Performs vertical interpolation on a pair of integral samples.
public  floatinterpolateV(float[] samples, float yfrac)
     Performs vertical interpolation on a one-dimensional array of floating-point samples.
public  floatinterpolateV(float s0, float s1, float yfrac)
     Performs vertical interpolation on a pair of floating-point samples.
public  doubleinterpolateV(double[] samples, float yfrac)
     Performs vertical interpolation on a one-dimensional array of double samples.
public  doubleinterpolateV(double s0, double s1, float yfrac)
     Performs vertical interpolation on a pair of double samples.


Constructor Detail
InterpolationNearest
public InterpolationNearest()(Code)
Constructs an InterpolationNearest. The return value of getSubsampleBitsH() and getSubsampleBitsV() will be 0.




Method Detail
interpolate
public int interpolate(int[][] samples, int xfrac, int yfrac)(Code)
Performs interpolation on a two-dimensional array of integral samples. The central sample (samples[0][0]) is returned.



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. The central sample (s00) is returned.



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. The central sample (s00) is returned.



interpolate
public float interpolate(float[][] samples, float xfrac, float yfrac)(Code)
Performs interpolation on a two-dimensional array of floating-point samples. The central sample (samples[0][0]) is returned.



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. The central sample (s00) is returned.



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. The central sample (s00) is returned.



interpolate
public double interpolate(double[][] samples, float xfrac, float yfrac)(Code)
Performs interpolation on a two-dimensional array of double samples. The central sample (samples[0][0]) is returned.



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. The central sample (s00) is returned.



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. The central sample (s00) is returned.



interpolateH
public int interpolateH(int[] samples, int xfrac)(Code)
Performs horizontal interpolation on a one-dimensional array of integral samples. The central sample (samples[0]) is returned.



interpolateH
public int interpolateH(int s0, int s1, int xfrac)(Code)
Performs horizontal interpolation on a pair of integral samples. The central sample (s0) is returned.



interpolateH
public float interpolateH(float[] samples, float xfrac)(Code)
Performs horizontal interpolation on a one-dimensional array of floating-point samples. The central sample (s0) is returned.



interpolateH
public float interpolateH(float s0, float s1, float xfrac)(Code)
Performs horizontal interpolation on a pair of floating-point samples. The central sample (s0) is returned.



interpolateH
public double interpolateH(double[] samples, float xfrac)(Code)
Performs horizontal interpolation on a one-dimensional array of double samples. The central sample (s0) is returned.



interpolateH
public double interpolateH(double s0, double s1, float xfrac)(Code)
Performs horizontal interpolation on a pair of double samples. The central sample (s0) is returned.



interpolateV
public int interpolateV(int[] samples, int yfrac)(Code)
Performs vertical interpolation on a one-dimensional array of integral samples. The central sample (samples[0]) is returned.



interpolateV
public int interpolateV(int s0, int s1, int yfrac)(Code)
Performs vertical interpolation on a pair of integral samples. The central sample (s0) is returned.



interpolateV
public float interpolateV(float[] samples, float yfrac)(Code)
Performs vertical interpolation on a one-dimensional array of floating-point samples. The central sample (s0) is returned.



interpolateV
public float interpolateV(float s0, float s1, float yfrac)(Code)
Performs vertical interpolation on a pair of floating-point samples. The central sample (s0) is returned.



interpolateV
public double interpolateV(double[] samples, float yfrac)(Code)
Performs vertical interpolation on a one-dimensional array of double samples. The central sample (s0) is returned.



interpolateV
public double interpolateV(double s0, double s1, float yfrac)(Code)
Performs vertical interpolation on a pair of double samples. The central sample (s0) is returned.



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.