public class ImageRGBDisplayable extends ucar.visad.display.DisplayableData implements ucar.visad.display.GridDisplayable
| Modifier and Type | Field and Description |
|---|---|
private ScalarMap[] |
colorMaps
color ScalarMaps
|
private float[][] |
colorPalette
color palette
|
private RealTupleType |
colorTupleType
color MathType
|
private boolean |
doAlpha
flag for whether we use Alpha channel or not
|
private DisplayRealType |
mapType
What do we map with
|
| Modifier | Constructor and Description |
|---|---|
protected |
ImageRGBDisplayable(ImageRGBDisplayable that)
Constructs from another instance.
|
|
ImageRGBDisplayable(java.lang.String name)
Constructs from a name for the Displayable and the type of the
RGB parameter.
|
|
ImageRGBDisplayable(java.lang.String name,
boolean doAlpha)
Constructs from a name for the Displayable and the type of the
RGB parameter.
|
|
ImageRGBDisplayable(java.lang.String name,
float[][] colorPalette,
boolean doAlpha)
Constructs from a name for the Displayable and the type of the
RGB parameter.
|
|
ImageRGBDisplayable(java.lang.String name,
float[][] colorPalette,
boolean doAlpha,
FieldImpl field) |
| Modifier and Type | Method and Description |
|---|---|
float[][] |
getColorPalette()
Return the current color palette in this Displayable
|
RealTupleType |
getColorTupleType()
Get the RealTupleType of the RGB parameter.
|
protected DataRenderer |
getDataRenderer() |
RealTupleType |
getRGBRealTupleType()
Deprecated.
use getColorTupleType()
|
void |
loadData(FieldImpl field)
Set the data into the Displayable; set RGB Type
|
void |
setAlpha(float alpha)
Set the alpha.
|
void |
setColoredByAnother(boolean yesno)
Set whether this GridDisplayable should have the data colored
by another parameter.
|
private void |
setColorMaps()
creates the ScalarMaps for color for this Displayable.
|
void |
setColorPalette(float[][] colorPalette)
This method sets the color palette
according to the color table in argument;
pair this method with setRange(lo,high) to get
a fixed association of color table and range of values.
|
private void |
setColorsInControls(float[][] colorPalette)
Set colors for the controls of all color maps.
|
private void |
setColorsInControls(float[][] colorPalette,
int colorMapIndex)
Set colors for the control defined by the given colorMapIndex (0, 1, or 2).
|
protected void |
setColorTupleType(RealTupleType realTupleType)
Sets the RealTupleType of the RGB parameter.
|
void |
setDisplay(LocalDisplay display)
Set the display.
|
protected void |
setScalarMaps(ucar.visad.display.ScalarMapSet maps)
Sets the set of ScalarMap-s of this instance.
|
addAction, cloneForDisplay, dataChange, destroy, getActive, getAnimationSet, getData, getLineWidth, getName, getPointSize, hasData, hasDataObject, isManipulable, isPickable, myAddConstantMaps, myAddDataReferences, myRemoveDataReferences, removeAction, setActive, setData, setDataReference, setDragAdapter, setLineWidth, setManipulable, setPickable, setPointMode, setPointSize, setUseFastRendering, setVisible, showme, toStringaddConstantMap, addConstantMaps, addDataReferences, addPropertyChangeListener, addPropertyChangeListener, addRefsInvoked, addScalarMap, addScalarMaps, applyColorUnit, applyDisplayUnit, checkUnit, combineConstantMaps, destroyDisplayable, firePropertyChange, firePropertyChange, fireScalarMapSetChange, getColorUnit, getConstantMaps, getDestroyed, getDisplay, getDisplayMaster, getDisplayUnit, getPointMode, getScalarMap, getScalarMap, getScalarMap, getScalarMapSet, getUseFastRendering, getUseTimesInAnimation, getVisible, isActive, isUnitCompatible, isVisible, logException, removeConstantMap, removeDataReferences, removePropertyChangeListener, removePropertyChangeListener, removeScalarMap, replaceScalarMap, setAdjustFlow, setColor, setColorPalette, setColorUnit, setConstantPosition, setContourInfo, setDisplayActive, setDisplayInactive, setDisplayMaster, setDisplayUnit, setOverrideAnimationSet, setOverrideAnimationSet, setParent, setRangeForColor, setRangeForColor, setScalarMapSet, setSelectedRange, setSelectedRange, setUseTimesInAnimation, toFrontprivate volatile RealTupleType colorTupleType
private float[][] colorPalette
private DisplayRealType mapType
private boolean doAlpha
public ImageRGBDisplayable(java.lang.String name) throws VisADException, java.rmi.RemoteException
name - The name for the displayable.VisADException - VisAD failure.java.rmi.RemoteException - Java RMI failure.public ImageRGBDisplayable(java.lang.String name, boolean doAlpha) throws VisADException, java.rmi.RemoteException
name - The name for the displayable.doAlpha - true to map to RGBAVisADException - VisAD failure.java.rmi.RemoteException - Java RMI failure.public ImageRGBDisplayable(java.lang.String name, float[][] colorPalette, boolean doAlpha) throws VisADException, java.rmi.RemoteException
name - The name for the displayable.colorPalette - The color palettedoAlpha - true to map to RGBAVisADException - VisAD failure.java.rmi.RemoteException - Java RMI failure.protected ImageRGBDisplayable(ImageRGBDisplayable that) throws VisADException, java.rmi.RemoteException
that - The other instance.VisADException - VisAD failure.java.rmi.RemoteException - Java RMI failure.public ImageRGBDisplayable(java.lang.String name, float[][] colorPalette, boolean doAlpha, FieldImpl field) throws VisADException, java.rmi.RemoteException
VisADExceptionjava.rmi.RemoteExceptionpublic void loadData(FieldImpl field) throws VisADException, java.rmi.RemoteException
loadData in interface ucar.visad.display.GridDisplayablefield - an image or sequence of imagesVisADException - from construction of VisAd objectsjava.rmi.RemoteException - from construction of VisAD objectspublic RealTupleType getColorTupleType()
null.protected void setColorTupleType(RealTupleType realTupleType) throws java.rmi.RemoteException, VisADException
realTupleType - The RealTupleType of the RGB parameters. May
not be null.VisADException - VisAD failure.java.rmi.RemoteException - Java RMI failure.public RealTupleType getRGBRealTupleType()
null.protected void setScalarMaps(ucar.visad.display.ScalarMapSet maps) throws BadMappingException
null for the old value and the new
set of ScalarMap-s for the new Value. Intermediate subclasses that
have their own ScalarMap-s should override this method and invoke
super.setScalarMaps(ScalarMapSet).maps - The set of ScalarMap-s to be added.BadMappingException - The RealType of the color parameter
has not been set or its ScalarMap is already in
the set.public void setAlpha(float alpha) throws java.rmi.RemoteException, VisADException
alpha - alphajava.rmi.RemoteException - On badnessVisADException - On badnessprivate void setColorMaps() throws java.rmi.RemoteException, VisADException
VisADException - VisAD failure.java.rmi.RemoteException - Java RMI failure.public void setDisplay(LocalDisplay display) throws DisplayException, VisADException, java.rmi.RemoteException
setDisplay in class ucar.visad.display.Displayabledisplay - display to set this intoDisplayException - Display type exceptionjava.rmi.RemoteException - Java RMI errorVisADException - problem creating VisAD objectpublic void setColorPalette(float[][] colorPalette) throws java.rmi.RemoteException, VisADException
setColorPalette in class ucar.visad.display.DisplayablecolorPalette - the color table or color-alpha table desiredVisADException - if a core VisAD failure occurs.java.rmi.RemoteException - if a Java RMI failure occurs.public float[][] getColorPalette()
private void setColorsInControls(float[][] colorPalette) throws java.rmi.RemoteException, VisADException
colorPalette - The 3xN color palette arrayjava.rmi.RemoteException - Java RMI errorVisADException - problem creating VisAD objectprivate void setColorsInControls(float[][] colorPalette, int colorMapIndex) throws java.rmi.RemoteException, VisADException
colorPalette - The 3xN color palette arraycolorMapIndex - Which of the color maps are we setting the color of.java.rmi.RemoteException - Java RMI errorVisADException - problem creating VisAD objectprotected DataRenderer getDataRenderer() throws VisADException
getDataRenderer in class ucar.visad.display.DisplayableDataVisADExceptionpublic void setColoredByAnother(boolean yesno)
setColoredByAnother in interface ucar.visad.display.GridDisplayableyesno - true if colored by another