Java Doc for MultiBandsIndexColorModel.java in  » GIS » GeoTools-2.4.1 » org » geotools » resources » image » 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 » GIS » GeoTools 2.4.1 » org.geotools.resources.image 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.awt.image.IndexColorModel
   org.geotools.resources.image.MultiBandsIndexColorModel

MultiBandsIndexColorModel
final class MultiBandsIndexColorModel extends IndexColorModel (Code)
An IndexColorModel tolerant with image having more than one band.

Reminder: MultiBandsIndexColorModel.getNumComponents will returns 3 or 4 no matter how many bands were specified to the constructor. This is not specific to this class; IndexColorModel behave that way. So we can't rely on this method for checking the number of bands.
since:
   2.0
version:
   $Id: MultiBandsIndexColorModel.java 20970 2006-08-11 07:53:22Z jgarnett $
author:
   Martin Desruisseaux
author:
   Andrea Aime



Field Summary
final  intnumBands
     The number of bands.

Constructor Summary
public  MultiBandsIndexColorModel(int bits, int size, int[] cmap, int start, boolean hasAlpha, int transparent, int transferType, int numBands, int visibleBand)
     Construct an object with the specified properties.
Parameters:
  bits - The number of bits each pixel occupies.
Parameters:
  size - The size of the color component arrays.
Parameters:
  cmap - The array of color components.
Parameters:
  start - The starting offset of the first color component.
Parameters:
  hasalpha - Indicates whether alpha values are contained in the cmap array.
Parameters:
  transparent - The index of the fully transparent pixel.
Parameters:
  transferType - The data type of the array used to represent pixel values.

Method Summary
public  SampleModelcreateCompatibleSampleModel(int width, int height)
     Creates a SampleModel with the specified width and height that has a data layout compatible with this ColorModel .
public  WritableRastercreateCompatibleWritableRaster(int width, int height)
     Creates a WritableRaster with the specified width and height that has a data layout ( SampleModel ) compatible with this ColorModel .
public  intgetAlpha(Object inData)
     Returns the alpha component for the specified pixel, scaled from 0 to 255.
public  intgetBlue(Object inData)
     Returns the blue color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace , sRGB.
public  int[]getComponents(Object pixel, int[] components, int offset)
     Returns an array of unnormalized color/alpha components for a specified pixel in this color model.
public  ObjectgetDataElements(int RGB, Object pixel)
     Returns a data element array representation of a pixel in this color model, given an integer pixel representation in the default RGB color model.

This method returns an array with a length equals to the number of bands specified to the constructor ( IndexColorModel would returns an array of length 1).

public  intgetGreen(Object inData)
     Returns the green color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace , sRGB.
public  intgetRed(Object inData)
     Returns the red color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace , sRGB.
public  booleanisCompatibleRaster(Raster raster)
     Returns true if raster is compatible with this ColorModel .
public  booleanisCompatibleSampleModel(SampleModel sm)
     Checks if the specified SampleModel is compatible with this ColorModel .

Field Detail
numBands
final int numBands(Code)
The number of bands.




Constructor Detail
MultiBandsIndexColorModel
public MultiBandsIndexColorModel(int bits, int size, int[] cmap, int start, boolean hasAlpha, int transparent, int transferType, int numBands, int visibleBand)(Code)
Construct an object with the specified properties.
Parameters:
  bits - The number of bits each pixel occupies.
Parameters:
  size - The size of the color component arrays.
Parameters:
  cmap - The array of color components.
Parameters:
  start - The starting offset of the first color component.
Parameters:
  hasalpha - Indicates whether alpha values are contained in the cmap array.
Parameters:
  transparent - The index of the fully transparent pixel.
Parameters:
  transferType - The data type of the array used to represent pixel values. Thedata type must be either DataBuffer.TYPE_BYTE or DataBuffer.TYPE_USHORT .
Parameters:
  numBands - The number of bands.
Parameters:
  visibleBands - The band to display.
throws:
  IllegalArgumentException - if bits is less than 1 or greater than 16.
throws:
  IllegalArgumentException - if size is less than 1.
throws:
  IllegalArgumentException - if transferType is not one of DataBuffer.TYPE_BYTE or DataBuffer.TYPE_USHORT .




Method Detail
createCompatibleSampleModel
public SampleModel createCompatibleSampleModel(int width, int height)(Code)
Creates a SampleModel with the specified width and height that has a data layout compatible with this ColorModel .



createCompatibleWritableRaster
public WritableRaster createCompatibleWritableRaster(int width, int height)(Code)
Creates a WritableRaster with the specified width and height that has a data layout ( SampleModel ) compatible with this ColorModel .



getAlpha
public int getAlpha(Object inData)(Code)
Returns the alpha component for the specified pixel, scaled from 0 to 255.



getBlue
public int getBlue(Object inData)(Code)
Returns the blue color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace , sRGB.



getComponents
public int[] getComponents(Object pixel, int[] components, int offset)(Code)
Returns an array of unnormalized color/alpha components for a specified pixel in this color model. This method is the converse of MultiBandsIndexColorModel.getDataElements .



getDataElements
public Object getDataElements(int RGB, Object pixel)(Code)
Returns a data element array representation of a pixel in this color model, given an integer pixel representation in the default RGB color model.

This method returns an array with a length equals to the number of bands specified to the constructor ( IndexColorModel would returns an array of length 1). All array elements are set to the same value. Replicating the pixel value is a somewhat arbitrary choice, but this choice make this image appears as a gray scale image if the underlying DataBuffer were displayed again with a RGB color model instead of this one. Such a gray scale image seems more neutral than an image where only the Red component would vary.

All other getDataElement methods in this color model are ultimately defined in terms of this method, so overriding this method should be enough.




getGreen
public int getGreen(Object inData)(Code)
Returns the green color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace , sRGB.



getRed
public int getRed(Object inData)(Code)
Returns the red color component for the specified pixel, scaled from 0 to 255 in the default RGB ColorSpace , sRGB.



isCompatibleRaster
public boolean isCompatibleRaster(Raster raster)(Code)
Returns true if raster is compatible with this ColorModel .



isCompatibleSampleModel
public boolean isCompatibleSampleModel(SampleModel sm)(Code)
Checks if the specified SampleModel is compatible with this ColorModel .



Methods inherited from java.awt.image.IndexColorModel
public BufferedImage convertToIntDiscrete(Raster raster, boolean forceARGB)(Code)(Java Doc)
public SampleModel createCompatibleSampleModel(int w, int h)(Code)(Java Doc)
public WritableRaster createCompatibleWritableRaster(int w, int h)(Code)(Java Doc)
public void finalize()(Code)(Java Doc)
final public int getAlpha(int pixel)(Code)(Java Doc)
final public void getAlphas(byte a)(Code)(Java Doc)
final public int getBlue(int pixel)(Code)(Java Doc)
final public void getBlues(byte b)(Code)(Java Doc)
public int[] getComponentSize()(Code)(Java Doc)
public int[] getComponents(int pixel, int[] components, int offset)(Code)(Java Doc)
public int[] getComponents(Object pixel, int[] components, int offset)(Code)(Java Doc)
public int getDataElement(int[] components, int offset)(Code)(Java Doc)
public synchronized Object getDataElements(int rgb, Object pixel)(Code)(Java Doc)
public Object getDataElements(int[] components, int offset, Object pixel)(Code)(Java Doc)
final public int getGreen(int pixel)(Code)(Java Doc)
final public void getGreens(byte g)(Code)(Java Doc)
final public int getMapSize()(Code)(Java Doc)
final public int getRGB(int pixel)(Code)(Java Doc)
final public void getRGBs(int rgb)(Code)(Java Doc)
final public int getRed(int pixel)(Code)(Java Doc)
final public void getReds(byte r)(Code)(Java Doc)
public int getTransparency()(Code)(Java Doc)
final public int getTransparentPixel()(Code)(Java Doc)
public BigInteger getValidPixels()(Code)(Java Doc)
public boolean isCompatibleRaster(Raster raster)(Code)(Java Doc)
public boolean isCompatibleSampleModel(SampleModel sm)(Code)(Java Doc)
public boolean isValid(int pixel)(Code)(Java Doc)
public boolean isValid()(Code)(Java Doc)
public String toString()(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.