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


java.lang.Object
   org.geotools.coverage.processing.ColorMap

ColorMap
public class ColorMap implements Serializable(Code)
Colors associated to categories. This is the parameter type for the org.geotools.coverage.processing.operation.Recolor operation.
since:
   2.4
version:
   $Id: ColorMap.java 27848 2007-11-12 13:10:32Z desruisseaux $
author:
   Martin Desruisseaux
See Also:   org.geotools.coverage.processing.operation.Recolororg.geotools.styling.ColorMap


Field Summary
final public static  CharSequenceANY_QUANTITATIVE_CATEGORY
     A special category name meaning "any quantitative value".

Constructor Summary
public  ColorMap()
     Creates an initially empty color map.
public  ColorMap(Color[] colors)
     Creates a color map initialized to the specified color ramp to be applied on .
public  ColorMap(Map colorMap)
     Creates a color map initialized to the specified map.

Method Summary
public  booleanequals(Object object)
     Compares this color map with the specified object for equality.
public  Color[]getColors(CharSequence category)
     Returns the color ramp for the given category.
Parameters:
  category - The , orColorMap.ANY_QUANTITATIVE_CATEGORY for fetching the colors toapply to any quantitative category.
public  MeasurementRangegetGeophysicsRange(CharSequence category)
     Returns the range of geophysics values for the given category.
Parameters:
  category - The , orColorMap.ANY_QUANTITATIVE_CATEGORY for fetching the range toapply to any quantitative category.
public  NumberRangegetRelativeRange(CharSequence category)
     Returns the relative range of values for the given category.
Parameters:
  category - The , orColorMap.ANY_QUANTITATIVE_CATEGORY for fetching the relativerange to apply to any quantitative category.
public  booleangetResetUnspecifiedColors()
     If true , the ARGB values corresponding to any not specified in this color map will be reset to the color specified by the category.
public  inthashCode()
     Returns a hash code value for this color map.
public  GridSampleDimensionrecolor(GridSampleDimension sampleDimension, int[] ARGB)
     Applies to the specified sample dimension the colors given to this color map.
public  voidsetColor(CharSequence category, Color color)
     Applies a uniform color to the given (usually qualitative) category.
public  voidsetColors(CharSequence category, Color[] colors)
     Applies a color ramp to the given (usually quantitative) category.
public  voidsetGeophysicsRange(CharSequence category, MeasurementRange range)
     Sets a range of geophysics values for the color ramp associated with a quantitative category. For example if the category "Height" applies to geophysics values in the range [0..500] metres and if a range of [100..400] metres is defined as below:
setRelativeRange("Height", new MeasurementRange(0, 100, SI.METRE)); setColors("Height", myColorPalette);
Then myColorPalette will applies to pixel values in the range [100..400] instead of [0..500].
public  voidsetRelativeRange(CharSequence category, NumberRange range)
     Sets a relative range of values for the color ramp associated to a quantitative category. For example if the category "Height" applies to pixel values in the range [0..200] and if a relative range of [20%..80%] is defined as below:
setRelativeRange("Height", new NumberRange(20, 80)); setColors("Height", myColorPalette);
Then myColorPalette will applies to pixel values in the range [40..160] instead of [0..200].
public  voidsetResetUnspecifiedColors(boolean reset)
     If true , the ARGB values corresponding to any not specified in this color map will be reset to the color specified by the category.
public  StringtoString()
     Returns a string representation of this color map.

Field Detail
ANY_QUANTITATIVE_CATEGORY
final public static CharSequence ANY_QUANTITATIVE_CATEGORY(Code)
A special category name meaning "any quantitative value".




Constructor Detail
ColorMap
public ColorMap()(Code)
Creates an initially empty color map.



ColorMap
public ColorMap(Color[] colors)(Code)
Creates a color map initialized to the specified color ramp to be applied on .



ColorMap
public ColorMap(Map colorMap)(Code)
Creates a color map initialized to the specified map.
Parameters:
  map - A map of (,) pairs.




Method Detail
equals
public boolean equals(Object object)(Code)
Compares this color map with the specified object for equality.



getColors
public Color[] getColors(CharSequence category)(Code)
Returns the color ramp for the given category.
Parameters:
  category - The , orColorMap.ANY_QUANTITATIVE_CATEGORY for fetching the colors toapply to any quantitative category. The color ramp, or null if none.



getGeophysicsRange
public MeasurementRange getGeophysicsRange(CharSequence category)(Code)
Returns the range of geophysics values for the given category.
Parameters:
  category - The , orColorMap.ANY_QUANTITATIVE_CATEGORY for fetching the range toapply to any quantitative category. The geophysics range, or null if none.



getRelativeRange
public NumberRange getRelativeRange(CharSequence category)(Code)
Returns the relative range of values for the given category.
Parameters:
  category - The , orColorMap.ANY_QUANTITATIVE_CATEGORY for fetching the relativerange to apply to any quantitative category. The relative range, or null if none.



getResetUnspecifiedColors
public boolean getResetUnspecifiedColors()(Code)
If true , the ARGB values corresponding to any not specified in this color map will be reset to the color specified by the category. The default value is false .



hashCode
public int hashCode()(Code)
Returns a hash code value for this color map.



recolor
public GridSampleDimension recolor(GridSampleDimension sampleDimension, int[] ARGB)(Code)
Applies to the specified sample dimension the colors given to this color map. This method iterates throug every in the given sample dimension. For each category with a matching one of the (name, colors) or (name, range) entries given to this color map, the Category.recolor recolor method is invoked on that category and the result inserted into a new sample dimension to be returned.

If the optional ARGB array is non-null, then the ARGB colors for recolorized categories will be written in this array. Only the elements with index in the will be overwritten; other elements will not be modified.

NOTE: The and ranges are taken in account for the ARGB array only; they do not have impact on the categories to be included in the returned sample dimension.
Parameters:
  sampleDimension - The sample dimension to recolorize.
Parameters:
  ARGB - An optional array where to store the ARGB values of recolorized categories,or null if none. A new sample dimension, or sampleDimension if no color change were applied.
See Also:   Category.recolor




setColor
public void setColor(CharSequence category, Color color)(Code)
Applies a uniform color to the given (usually qualitative) category.
Parameters:
  category - The for which to set the color.
Parameters:
  color - A uniform color to apply to the specified category, or null for removing the color mapping.
See Also:   ColorMap.recolor



setColors
public void setColors(CharSequence category, Color[] colors)(Code)
Applies a color ramp to the given (usually quantitative) category. The color array may have any length; colors will be interpolated as needed.
Parameters:
  category - The for which to setthe colors, or ColorMap.ANY_QUANTITATIVE_CATEGORY if the colors should apply toany quantitative category.
Parameters:
  colors - The colors to apply to the specified category, or null or an empty array for removing the color mapping.
See Also:   ColorMap.recolor



setGeophysicsRange
public void setGeophysicsRange(CharSequence category, MeasurementRange range)(Code)
Sets a range of geophysics values for the color ramp associated with a quantitative category. For example if the category "Height" applies to geophysics values in the range [0..500] metres and if a range of [100..400] metres is defined as below:
setRelativeRange("Height", new MeasurementRange(0, 100, SI.METRE)); setColors("Height", myColorPalette);
Then myColorPalette will applies to pixel values in the range [100..400] instead of [0..500]. This is typically used in order to augment the contrast in a range of values of special interest.

This method is exclusive with ColorMap.setRelativeRange .
Parameters:
  category - The for which to set the geophysics range.
Parameters:
  range - The minimal and maximal values for the color ramp. A null value removes the range mapping.
See Also:   ColorMap.recolor




setRelativeRange
public void setRelativeRange(CharSequence category, NumberRange range)(Code)
Sets a relative range of values for the color ramp associated to a quantitative category. For example if the category "Height" applies to pixel values in the range [0..200] and if a relative range of [20%..80%] is defined as below:
setRelativeRange("Height", new NumberRange(20, 80)); setColors("Height", myColorPalette);
Then myColorPalette will applies to pixel values in the range [40..160] instead of [0..200]. This is typically used in order to augment the contrast in a range of values of special interest.

This method is exclusive with ColorMap.setGeophysicsRange .
Parameters:
  category - The for which to set the relative range.
Parameters:
  range - The minimal and maximal relative values for the color ramp, as percentagesbetween 0 and 100. A null value removes the range mapping.
See Also:   ColorMap.recolor




setResetUnspecifiedColors
public void setResetUnspecifiedColors(boolean reset)(Code)
If true , the ARGB values corresponding to any not specified in this color map will be reset to the color specified by the category. The default value is false .



toString
public String toString()(Code)
Returns a string representation of this color map.



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.