public class ColorComposite extends EarthDataView
Modifier and Type | Field and Description |
---|---|
static int |
BLUE
The blue component.
|
static int |
GREEN
The green component.
|
static int |
RED
The red component.
|
changed, image, imageDims, overlays, progress, stopRendering, trans, UPDATE_FRACTION, verbose
Constructor and Description |
---|
ColorComposite(EarthTransform trans,
Grid[] grids,
EnhancementFunction[] funcs)
Constructs a new color composite from the specified parameters.
|
Modifier and Type | Method and Description |
---|---|
EnhancementFunction[] |
getFunctions()
Gets the enhancement functions.
|
Grid[] |
getGrids()
Gets the data grid variables.
|
void |
normalize(int component,
double units)
Normalizes the enhancement function for this view using the
visible grid value statistics.
|
protected void |
prepare(java.awt.Graphics2D g)
Prepares this view for rendering using the specified graphics
object.
|
void |
setFunctions(EnhancementFunction[] funcs)
Sets the enhancement functions.
|
void |
setGrids(Grid[] grids)
Sets the data grid variables.
|
addOverlay, addOverlays, clone, computeCaches, containsOverlay, getArea, getBounds, getCenter, getCorners, getImageAffine, getLegend, getOrientationAffine, getOverlays, getProgress, getResolution, getScale, getSize, getSubregion, getTransform, getUpsideDown, hasCompatibleCaches, hasCoordinateCaches, invalidate, isChanged, isPrepared, isRendering, magnify, magnify, magnify, main, removeOverlay, render, reset, resize, resize, resizeHeight, resizeMaxAspect, resizeWidth, setCenter, setCenterAndScale, setChanged, setImageAffine, setProgress, setProperties, setSize, setVerbose, showSubregion, stopRendering, transform, transform
public static final int RED
public static final int GREEN
public static final int BLUE
public ColorComposite(EarthTransform trans, Grid[] grids, EnhancementFunction[] funcs) throws java.awt.geom.NoninvertibleTransformException
trans
- the view earth transform.grids
- the grid variables to use for this composite as
[red, green, blue]. Note that the grids must all have the same
dimensions.funcs
- the enhancement functions as [red, green,
blue].java.awt.geom.NoninvertibleTransformException
- if the resulting image
transform is not invertible.public Grid[] getGrids()
public EnhancementFunction[] getFunctions()
public void setGrids(Grid[] grids)
grids
- the array of three grid variables. The order of
grid variables is [red, green, blue]. Note that the grids must
all have the same dimensions.public void setFunctions(EnhancementFunction[] funcs)
funcs
- the array of three enhancement functions. The order of
functions is the same as the order of grids: [red, green, blue].protected void prepare(java.awt.Graphics2D g)
EarthDataView
prepare
in class EarthDataView
public void normalize(int component, double units)
component
- the component to enhance, either RED
,
GREEN
, or BLUE
.units
- the number of standard deviation units above and
below the mean for the data range.