Java Doc for ColorCube.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.LookupTableJAI
      javax.media.jai.ColorCube

ColorCube
public class ColorCube extends LookupTableJAI (Code)
A subclass of LookupTableJAI which represents a lookup table which is a color cube. A color cube provides a fixed, invertible mapping between table indices and sample values. This allows the findNearestEntry method to be implemented more efficiently than in the general case.

All constructors are protected. The correct way to create a ColorCube is to use one of the static create methods defined in this class.
See Also:   javax.media.jai.LookupTableJAI



Field Summary
final public static  ColorCubeBYTE_496
     A ColorCube for dithering RGB byte data into 216 colors.
final public static  ColorCubeBYTE_855
     A ColorCube for dithering YCC byte data into 200 colors.

Constructor Summary
protected  ColorCube(byte data, int offset)
     Returns a multi-banded byte ColorCube with an index offset common to all bands.
protected  ColorCube(short data, int offset, boolean isUShort)
     Returns a multi-banded short or unsigned short ColorCube with an index offset common to all bands.
protected  ColorCube(int data, int offset)
     Returns a multi-banded int ColorCube with an index offset common to all bands.
protected  ColorCube(float data, int offset)
     Returns a multi-banded float ColorCube with an index offset common to all bands.
protected  ColorCube(double data, int offset)
     Returns a multi-banded double ColorCube with an index offset common to all bands.

Method Summary
public static  ColorCubecreateColorCube(int dataType, int offset, int dimension)
     Returns a multi-banded ColorCube of a specified data type.
public static  ColorCubecreateColorCube(int dataType, int dimension)
     Returns a multi-banded ColorCube of a specified data type with zero offset for all bands.
Parameters:
  dataType - The data type of the ColorCube.
Parameters:
  dimension - The signed dimension of each band.
throws:
  IllegalArgumentException - if dimension is null.
public  intfindNearestEntry(float[] pixel)
     Finds the index of the nearest color in the color map to the pixel value argument.
Parameters:
  pixel - a float array of all samples of a pixel.
public  intgetAdjustedOffset()
     Returns the adjusted offset into the lookup table, accounting for negative dimensions.
public  int[]getDimension()
     Returns the array of signed dimensions used to construct the ColorCube.
public  int[]getDimsLessOne()
     Returns an array containing the signed dimensions, less one.
public  int[]getMultipliers()
     Returns the multipliers as an array.

Field Detail
BYTE_496
final public static ColorCube BYTE_496(Code)
A ColorCube for dithering RGB byte data into 216 colors. The offset of this ColorCube is 38.



BYTE_855
final public static ColorCube BYTE_855(Code)
A ColorCube for dithering YCC byte data into 200 colors. The offset of this ColorCube is 54.




Constructor Detail
ColorCube
protected ColorCube(byte data, int offset)(Code)
Returns a multi-banded byte ColorCube with an index offset common to all bands.
Parameters:
  data - The multi-banded byte data in [band][index] format.
Parameters:
  offset - The common offset for all bands.
throws:
  IllegalArgumentException - if data is null.



ColorCube
protected ColorCube(short data, int offset, boolean isUShort)(Code)
Returns a multi-banded short or unsigned short ColorCube with an index offset common to all bands.
Parameters:
  data - The multi-banded short data in [band][index] format.
Parameters:
  offset - The common offset for all bands.
Parameters:
  isUShort - True if data type is DataBuffer.TYPE_USHORT;false if data type is DataBuffer.TYPE_SHORT.
throws:
  IllegalArgumentException - if data is null.



ColorCube
protected ColorCube(int data, int offset)(Code)
Returns a multi-banded int ColorCube with an index offset common to all bands.
Parameters:
  data - The multi-banded int data in [band][index] format.
Parameters:
  offset - The common offset for all bands.
throws:
  IllegalArgumentException - if data is null.



ColorCube
protected ColorCube(float data, int offset)(Code)
Returns a multi-banded float ColorCube with an index offset common to all bands.
Parameters:
  data - The multi-banded float data in [band][index] format.
Parameters:
  offset - The common offset for all bands.
throws:
  IllegalArgumentException - if data is null.



ColorCube
protected ColorCube(double data, int offset)(Code)
Returns a multi-banded double ColorCube with an index offset common to all bands.
Parameters:
  data - The multi-banded double data in [band][index] format.
Parameters:
  offset - The common offset for all bands.
throws:
  IllegalArgumentException - if data is null.




Method Detail
createColorCube
public static ColorCube createColorCube(int dataType, int offset, int dimension)(Code)
Returns a multi-banded ColorCube of a specified data type.
Parameters:
  dataType - The data type of the ColorCube,one of DataBuffer.TYPE_BYTE,TYPE_SHORT,TYPE_USHORT,TYPE_INT,TYPE_FLOAT,or TYPE_DOUBLE.
Parameters:
  offset - The common offset for all bands.
Parameters:
  dimension - The signed dimension of each band.
throws:
  RuntimeExceptions - for unsupported data types An appropriate ColorCube.



createColorCube
public static ColorCube createColorCube(int dataType, int dimension)(Code)
Returns a multi-banded ColorCube of a specified data type with zero offset for all bands.
Parameters:
  dataType - The data type of the ColorCube.
Parameters:
  dimension - The signed dimension of each band.
throws:
  IllegalArgumentException - if dimension is null. An appropriate ColorCube.



findNearestEntry
public int findNearestEntry(float[] pixel)(Code)
Finds the index of the nearest color in the color map to the pixel value argument.
Parameters:
  pixel - a float array of all samples of a pixel. the index of the nearest color.
throws:
  RuntimeException - for dataTypes other thanDataBuffer.TYPE_BYTE DataBuffer.TYPE_USHORTDataBuffer.TYPE_SHORT DataBuffer.TYPE_INTDataBuffer.TYPE_FLOAT DataBuffer.TYPE_DOUBLE



getAdjustedOffset
public int getAdjustedOffset()(Code)
Returns the adjusted offset into the lookup table, accounting for negative dimensions.



getDimension
public int[] getDimension()(Code)
Returns the array of signed dimensions used to construct the ColorCube.



getDimsLessOne
public int[] getDimsLessOne()(Code)
Returns an array containing the signed dimensions, less one.



getMultipliers
public int[] getMultipliers()(Code)
Returns the multipliers as an array.



Fields inherited from javax.media.jai.LookupTableJAI
transient DataBuffer data(Code)(Java Doc)

Methods inherited from javax.media.jai.LookupTableJAI
public int findNearestEntry(float[] pixel)(Code)(Java Doc)
public byte[][] getByteData()(Code)(Java Doc)
public byte[] getByteData(int band)(Code)(Java Doc)
public DataBuffer getData()(Code)(Java Doc)
public int getDataType()(Code)(Java Doc)
public int getDestNumBands(int srcNumBands)(Code)(Java Doc)
public SampleModel getDestSampleModel(SampleModel srcSampleModel)(Code)(Java Doc)
public SampleModel getDestSampleModel(SampleModel srcSampleModel, int width, int height)(Code)(Java Doc)
public double[][] getDoubleData()(Code)(Java Doc)
public double[] getDoubleData(int band)(Code)(Java Doc)
public float[][] getFloatData()(Code)(Java Doc)
public float[] getFloatData(int band)(Code)(Java Doc)
public int[][] getIntData()(Code)(Java Doc)
public int[] getIntData(int band)(Code)(Java Doc)
public int getNumBands()(Code)(Java Doc)
public int getNumEntries()(Code)(Java Doc)
public int getOffset()(Code)(Java Doc)
public int getOffset(int band)(Code)(Java Doc)
public int[] getOffsets()(Code)(Java Doc)
public short[][] getShortData()(Code)(Java Doc)
public short[] getShortData(int band)(Code)(Java Doc)
public boolean isIntegralDataType(SampleModel sampleModel)(Code)(Java Doc)
public boolean isIntegralDataType(int dataType)(Code)(Java Doc)
public int lookup(int band, int value)(Code)(Java Doc)
public WritableRaster lookup(WritableRaster src)(Code)(Java Doc)
public WritableRaster lookup(Raster src, WritableRaster dst, Rectangle rect)(Code)(Java Doc)
public double lookupDouble(int band, int value)(Code)(Java Doc)
public float lookupFloat(int band, int value)(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.