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

KernelJAI
public class KernelJAI extends Object implements Serializable(Code)
A kernel representing a matrix with a key position, used by operators such as Convolve .

A KernelJAI is characterized by its width, height, and origin, or key element. The key element is the element which is placed over the current source pixel to perform convolution or error diffusion.

A kernel K is separable it the outer product of two one-dimensional vectors. It can speed up computation. One can construct a kernel from two one-dimensional vectors. <>The symmetry can be useful (such as computation speedup). Currently the protected instance variables isHorizonallySymmetric and isVerticallySymmetric are set to false.
See Also:   javax.media.jai.operator.ConvolveDescriptor
See Also:   javax.media.jai.operator.OrderedDitherDescriptor
See Also:   javax.media.jai.operator.ErrorDiffusionDescriptor



Field Summary
final public static  KernelJAI[]DITHER_MASK_441
     4x4x1 mask useful for dithering 8-bit grayscale images to 1-bit images.
final public static  KernelJAI[]DITHER_MASK_443
     4x4x3 mask useful for dithering 24-bit color images to 8-bit pseudocolor images.
final public static  KernelJAIERROR_FILTER_FLOYD_STEINBERG
     Floyd and Steinberg error filter (1975).
final public static  KernelJAIERROR_FILTER_JARVIS
     Jarvis, Judice, and Ninke error filter (1976).
final public static  KernelJAIERROR_FILTER_STUCKI
     Stucki error filter (1981).
final public static  KernelJAIGRADIENT_MASK_SOBEL_HORIZONTAL
     Gradient Mask for SOBEL_HORIZONTAL.
final public static  KernelJAIGRADIENT_MASK_SOBEL_VERTICAL
     Gradient Mask for SOBEL_VERTICAL.
protected  float[]data
     The kernel data in row-major format.
protected  float[]dataH
    
protected  float[]dataV
    
protected  intheight
     The height of the kernel.
protected  booleanisHorizontallySymmetric
     True if the kernel has horizontal (Y axis) symmetry.
protected  booleanisSeparable
     True if the kernel is separable.
protected  booleanisVerticallySymmetric
     True if the kernel has vertical (X axis) symmetry.
protected  KernelJAIrotatedKernel
    
protected  intwidth
     The width of the kernel.
protected  intxOrigin
     The X coordinate of the key element.
protected  intyOrigin
     The Y coordinate of the key element.

Constructor Summary
public  KernelJAI(int width, int height, int xOrigin, int yOrigin, float[] data)
     Constructs a KernelJAI with the given parameters.
public  KernelJAI(int width, int height, int xOrigin, int yOrigin, float[] dataH, float[] dataV)
     Constructs a separable KernelJAI from two float arrays. The data arrays are copied. A Separable kernel K = dataH * dataV^T, the outer product of two one dimensional vectors dataH and dataV.
public  KernelJAI(int width, int height, float[] data)
     Constructs a kernel with the given parameters.
public  KernelJAI(Kernel k)
     Constructs a KernelJAI from a java.awt.image.Kernel object.

Method Summary
public  intgetBottomPadding()
     Returns the number of pixels required below the key element.
public  floatgetElement(int xIndex, int yIndex)
     Returns a given element of the kernel.
public  intgetHeight()
     Returns the height of the kernel.
public  float[]getHorizontalKernelData()
     Returns the horizontal portion of the kernel if the kernel is separable, or null otherwise.
public  float[]getKernelData()
     Returns a copy of the kernel data in row-major format.
public  intgetLeftPadding()
     Returns the number of pixels required to the left of the key element.
public  intgetRightPadding()
     Returns the number of pixels required to the right of the key element.
public  KernelJAIgetRotatedKernel()
     Returns a 180 degree rotated version of the kernel.
public  intgetTopPadding()
     Returns the number of pixels required above the key element.
public  float[]getVerticalKernelData()
     Returns the vertical portion of the kernel if the kernel is separable, or null otherwise.
public  intgetWidth()
     Returns the width of the kernel.
public  intgetXOrigin()
     Returns the X coordinate of the key kernel element.
public  intgetYOrigin()
     Returns the Y coordinate of the key kernel element.
public  booleanisHorizontallySymmetric()
     Returns true if the kernel has horizontal (Y axis) symmetry.
public  booleanisSeparable()
     Returns true if the kernel is separable.
public  booleanisVerticallySymmetric()
     Returns true if the kernel has vertical (X axis) symmetry.

Field Detail
DITHER_MASK_441
final public static KernelJAI[] DITHER_MASK_441(Code)
4x4x1 mask useful for dithering 8-bit grayscale images to 1-bit images.



DITHER_MASK_443
final public static KernelJAI[] DITHER_MASK_443(Code)
4x4x3 mask useful for dithering 24-bit color images to 8-bit pseudocolor images.



ERROR_FILTER_FLOYD_STEINBERG
final public static KernelJAI ERROR_FILTER_FLOYD_STEINBERG(Code)
Floyd and Steinberg error filter (1975).
 (1/16 x)  [   * 7 ]
 [ 3 5 1 ]
 



ERROR_FILTER_JARVIS
final public static KernelJAI ERROR_FILTER_JARVIS(Code)
Jarvis, Judice, and Ninke error filter (1976).
 [     * 7 5 ]
 (1/48 x)  [ 3 5 7 5 3 ]
 [ 1 3 5 3 1 ]
 



ERROR_FILTER_STUCKI
final public static KernelJAI ERROR_FILTER_STUCKI(Code)
Stucki error filter (1981).
 [     * 7 5 ]
 (1/42 x)  [ 2 4 8 4 2 ]
 [ 1 2 4 2 1 ]
 



GRADIENT_MASK_SOBEL_HORIZONTAL
final public static KernelJAI GRADIENT_MASK_SOBEL_HORIZONTAL(Code)
Gradient Mask for SOBEL_HORIZONTAL.



GRADIENT_MASK_SOBEL_VERTICAL
final public static KernelJAI GRADIENT_MASK_SOBEL_VERTICAL(Code)
Gradient Mask for SOBEL_VERTICAL.



data
protected float[] data(Code)
The kernel data in row-major format.



dataH
protected float[] dataH(Code)
The horizontal data for a separable kernel



dataV
protected float[] dataV(Code)
The vertical data for a separable kernel



height
protected int height(Code)
The height of the kernel.



isHorizontallySymmetric
protected boolean isHorizontallySymmetric(Code)
True if the kernel has horizontal (Y axis) symmetry.



isSeparable
protected boolean isSeparable(Code)
True if the kernel is separable.



isVerticallySymmetric
protected boolean isVerticallySymmetric(Code)
True if the kernel has vertical (X axis) symmetry.



rotatedKernel
protected KernelJAI rotatedKernel(Code)
Variable to cache a copy of the rotated kernel



width
protected int width(Code)
The width of the kernel.



xOrigin
protected int xOrigin(Code)
The X coordinate of the key element.



yOrigin
protected int yOrigin(Code)
The Y coordinate of the key element.




Constructor Detail
KernelJAI
public KernelJAI(int width, int height, int xOrigin, int yOrigin, float[] data)(Code)
Constructs a KernelJAI with the given parameters. The data array is copied.
Parameters:
  width - the width of the kernel.
Parameters:
  height - the height of the kernel.
Parameters:
  xOrigin - the X coordinate of the key kernel element.
Parameters:
  yOrigin - the Y coordinate of the key kernel element.
Parameters:
  data - the float data in row-major format.
throws:
  IllegalArgumentException - if data is null.
throws:
  IllegalArgumentException - if width is not a positive number.
throws:
  IllegalArgumentException - if height is not a positive number.
throws:
  IllegalArgumentException - if kernel data array does not havewidth * height number of elements.



KernelJAI
public KernelJAI(int width, int height, int xOrigin, int yOrigin, float[] dataH, float[] dataV)(Code)
Constructs a separable KernelJAI from two float arrays. The data arrays are copied. A Separable kernel K = dataH * dataV^T, the outer product of two one dimensional vectors dataH and dataV. It can often speed up compution.
Parameters:
  width - the width of the kernel.
Parameters:
  height - the height of the kernel.
Parameters:
  xOrigin - the X coordinate of the key kernel element.
Parameters:
  yOrigin - the Y coordinate of the key kernel element.
Parameters:
  dataH - the float data for the horizontal direction.
Parameters:
  dataV - the float data for the vertical direction.
throws:
  IllegalArgumentException - if dataH is null.
throws:
  IllegalArgumentException - if dataV is null.
throws:
  IllegalArgumentException - if width is not a positive number.
throws:
  IllegalArgumentException - if height is not a positive number.
throws:
  IllegalArgumentException - if dataH does not have width elements.
throws:
  IllegalArgumentException - if dataV does not have height elements.



KernelJAI
public KernelJAI(int width, int height, float[] data)(Code)
Constructs a kernel with the given parameters. The data array is copied. The key element is set to (trunc(width/2), trunc(height/2)).
Parameters:
  width - the width of the kernel.
Parameters:
  height - the height of the kernel.
Parameters:
  data - the float data in row-major format.
throws:
  IllegalArgumentException - if data is null.
throws:
  IllegalArgumentException - if width is not a positive number.
throws:
  IllegalArgumentException - if height is not a positive number.
throws:
  IllegalArgumentException - if data does not havewidth * height number of elements.



KernelJAI
public KernelJAI(Kernel k)(Code)
Constructs a KernelJAI from a java.awt.image.Kernel object.
throws:
  NullPointerException - if k is null.




Method Detail
getBottomPadding
public int getBottomPadding()(Code)
Returns the number of pixels required below the key element.



getElement
public float getElement(int xIndex, int yIndex)(Code)
Returns a given element of the kernel.
throws:
  ArrayIndexOutOfBoundsException - if either xIndex or yIndex isan invalid index.



getHeight
public int getHeight()(Code)
Returns the height of the kernel.



getHorizontalKernelData
public float[] getHorizontalKernelData()(Code)
Returns the horizontal portion of the kernel if the kernel is separable, or null otherwise. The kernel may be tested for separability by calling isSeparable().



getKernelData
public float[] getKernelData()(Code)
Returns a copy of the kernel data in row-major format.



getLeftPadding
public int getLeftPadding()(Code)
Returns the number of pixels required to the left of the key element.



getRightPadding
public int getRightPadding()(Code)
Returns the number of pixels required to the right of the key element.



getRotatedKernel
public KernelJAI getRotatedKernel()(Code)
Returns a 180 degree rotated version of the kernel. This is needed by most convolve operations to get the correct results. the rotated kernel.



getTopPadding
public int getTopPadding()(Code)
Returns the number of pixels required above the key element.



getVerticalKernelData
public float[] getVerticalKernelData()(Code)
Returns the vertical portion of the kernel if the kernel is separable, or null otherwise. The kernel may be tested for separability by calling isSeparable().



getWidth
public int getWidth()(Code)
Returns the width of the kernel.



getXOrigin
public int getXOrigin()(Code)
Returns the X coordinate of the key kernel element.



getYOrigin
public int getYOrigin()(Code)
Returns the Y coordinate of the key kernel element.



isHorizontallySymmetric
public boolean isHorizontallySymmetric()(Code)
Returns true if the kernel has horizontal (Y axis) symmetry.



isSeparable
public boolean isSeparable()(Code)
Returns true if the kernel is separable.



isVerticallySymmetric
public boolean isVerticallySymmetric()(Code)
Returns true if the kernel has vertical (X axis) symmetry.



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.