|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.esa.beam.framework.datamodel.ColorPaletteDef
public class ColorPaletteDef
The ColorPaletteDef class represents a curve that is used to transform the sample values of a
geo-physical band into color palette indexes.
This special implemnentation of a gradation curve also provides separate color values for each of the tie points contained in the curve. This allows a better image interpretation because certain colors correspond to certain sample values even if the curve points are used to create color gradient palettes.
| Nested Class Summary | |
|---|---|
static class |
ColorPaletteDef.Point
|
| Constructor Summary | |
|---|---|
ColorPaletteDef(ColorPaletteDef.Point[] points)
|
|
ColorPaletteDef(ColorPaletteDef.Point[] points,
int numColors)
|
|
ColorPaletteDef(double minSample,
double maxSample)
|
|
ColorPaletteDef(double minSample,
double centerSample,
double maxSample)
|
|
| Method Summary | |
|---|---|
void |
addPoint(ColorPaletteDef.Point point)
|
Object |
clone()
|
Color |
computeColor(Scaling scaling,
double sample)
|
static Color |
createCenterColor(ColorPaletteDef.Point p1,
ColorPaletteDef.Point p2)
Deprecated. since BEAM 4.2, use getCenterColor(java.awt.Color, java.awt.Color) |
Color[] |
createColorPalette(Scaling scaling)
|
ColorPaletteDef |
createDeepCopy()
|
boolean |
createPointAfter(int index,
Scaling scaling)
creates a new point between the point at the given index |
void |
dispose()
Releases all of the resources used by this color palette definition and all of its owned children. |
static Color |
getCenterColor(Color c1,
Color c2)
Creates the center color between the given two colors. |
Color[] |
getColors()
|
ColorPaletteDef.Point |
getFirstPoint()
|
Iterator |
getIterator()
|
ColorPaletteDef.Point |
getLastPoint()
|
double |
getMaxDisplaySample()
|
double |
getMinDisplaySample()
|
int |
getNumColors()
|
int |
getNumPoints()
|
ColorPaletteDef.Point |
getPointAt(int index)
|
ColorPaletteDef.Point[] |
getPoints()
|
void |
insertPointAfter(int index,
ColorPaletteDef.Point point)
|
boolean |
isAutoDistribute()
|
boolean |
isDiscrete()
|
static ColorPaletteDef |
loadColorPaletteDef(File file)
Loads a color palette definition from the given file |
void |
removePointAt(int index)
|
void |
setAutoDistribute(boolean autoDistribute)
|
void |
setDiscrete(boolean discrete)
|
void |
setNumColors(int numColors)
|
void |
setNumPoints(int numPoints)
|
void |
setPoints(ColorPaletteDef.Point[] points)
|
static void |
storeColorPaletteDef(ColorPaletteDef colorPaletteDef,
File file)
Stores this color palette definition in the given file |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ColorPaletteDef(double minSample,
double maxSample)
public ColorPaletteDef(double minSample,
double centerSample,
double maxSample)
public ColorPaletteDef(ColorPaletteDef.Point[] points)
public ColorPaletteDef(ColorPaletteDef.Point[] points,
int numColors)
| Method Detail |
|---|
public boolean isDiscrete()
public void setDiscrete(boolean discrete)
public int getNumColors()
public void setNumColors(int numColors)
public int getNumPoints()
public void setNumPoints(int numPoints)
public boolean isAutoDistribute()
public void setAutoDistribute(boolean autoDistribute)
public ColorPaletteDef.Point getPointAt(int index)
public ColorPaletteDef.Point getFirstPoint()
public ColorPaletteDef.Point getLastPoint()
public double getMinDisplaySample()
public double getMaxDisplaySample()
public void insertPointAfter(int index,
ColorPaletteDef.Point point)
public boolean createPointAfter(int index,
Scaling scaling)
index - the indexscaling - the scaling
@Deprecated
public static Color createCenterColor(ColorPaletteDef.Point p1,
ColorPaletteDef.Point p2)
getCenterColor(java.awt.Color, java.awt.Color)
p1 - 1st pointp2 - 2nd point
public static Color getCenterColor(Color c1,
Color c2)
c1 - 1st colorc2 - 2nd color
public void removePointAt(int index)
public void addPoint(ColorPaletteDef.Point point)
public ColorPaletteDef.Point[] getPoints()
public void setPoints(ColorPaletteDef.Point[] points)
public Iterator getIterator()
public final Object clone()
clone in class Objectpublic ColorPaletteDef createDeepCopy()
public static ColorPaletteDef loadColorPaletteDef(File file)
throws IOException
file - the file
IOException - if an I/O error occurs
public static void storeColorPaletteDef(ColorPaletteDef colorPaletteDef,
File file)
throws IOException
colorPaletteDef - thje color palette definitionfile - the file
IOException - if an I/O error occurspublic void dispose()
This method should be called only if it is for sure that this object instance will never be used again. The
results of referencing an instance of this class after a call to dispose() are undefined.
Overrides of this method should always call super.dispose(); after disposing this instance.
public Color[] getColors()
public Color[] createColorPalette(Scaling scaling)
public Color computeColor(Scaling scaling,
double sample)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||