|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectucar.visad.display.Displayable
ucar.visad.display.DisplayableData
edu.wisc.ssec.mcidasv.data.hydra.ImageRGBDisplayable
public class ImageRGBDisplayable
Provides support for a Displayable that needs a map to (Display.Red,Display.Green,Display.Blue)
Nested Class Summary |
---|
Nested classes/interfaces inherited from class ucar.visad.display.DisplayableData |
---|
DisplayableData.DragAdapter |
Field Summary | |
---|---|
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 |
private static int |
uniqueID
|
Fields inherited from class ucar.visad.display.DisplayableData |
---|
LINE_WIDTH, MANIPULABLE, renderer, VISIBLE |
Fields inherited from class ucar.visad.display.Displayable |
---|
DISPLAY, parent, SCALAR_MAP_SET |
Constructor Summary | |
---|---|
protected |
ImageRGBDisplayable(ImageRGBDisplayable that)
Constructs from another instance. |
|
ImageRGBDisplayable(String name)
Constructs from a name for the Displayable and the type of the RGB parameter. |
|
ImageRGBDisplayable(String name,
boolean doAlpha)
Constructs from a name for the Displayable and the type of the RGB parameter. |
|
ImageRGBDisplayable(String name,
float[][] colorPalette,
boolean doAlpha)
Constructs from a name for the Displayable and the type of the RGB parameter. |
|
ImageRGBDisplayable(String name,
float[][] colorPalette,
boolean doAlpha,
FieldImpl field)
|
Method Summary | |
---|---|
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(ScalarMapSet maps)
Sets the set of ScalarMap-s of this instance. |
Methods inherited from class ucar.visad.display.DisplayableData |
---|
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, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private volatile ScalarMap[] colorMaps
private volatile RealTupleType colorTupleType
private float[][] colorPalette
private DisplayRealType mapType
private boolean doAlpha
private static int uniqueID
Constructor Detail |
---|
public ImageRGBDisplayable(String name) throws VisADException, RemoteException
name
- The name for the displayable.
VisADException
- VisAD failure.
RemoteException
- Java RMI failure.public ImageRGBDisplayable(String name, boolean doAlpha) throws VisADException, RemoteException
name
- The name for the displayable.doAlpha
- true to map to RGBA
VisADException
- VisAD failure.
RemoteException
- Java RMI failure.public ImageRGBDisplayable(String name, float[][] colorPalette, boolean doAlpha) throws VisADException, RemoteException
name
- The name for the displayable.colorPalette
- The color palettedoAlpha
- true to map to RGBA
VisADException
- VisAD failure.
RemoteException
- Java RMI failure.protected ImageRGBDisplayable(ImageRGBDisplayable that) throws VisADException, RemoteException
that
- The other instance.
VisADException
- VisAD failure.
RemoteException
- Java RMI failure.public ImageRGBDisplayable(String name, float[][] colorPalette, boolean doAlpha, FieldImpl field) throws VisADException, RemoteException
VisADException
RemoteException
Method Detail |
---|
public void loadData(FieldImpl field) throws VisADException, RemoteException
loadData
in interface GridDisplayable
field
- an image or sequence of images
VisADException
- from construction of VisAd objects
RemoteException
- from construction of VisAD objectspublic RealTupleType getColorTupleType()
null
.protected void setColorTupleType(RealTupleType realTupleType) throws RemoteException, VisADException
realTupleType
- The RealTupleType of the RGB parameters. May
not be null
.
VisADException
- VisAD failure.
RemoteException
- Java RMI failure.public RealTupleType getRGBRealTupleType()
null
.protected void setScalarMaps(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 alread in
the set.public void setAlpha(float alpha) throws RemoteException, VisADException
alpha
- alpha
RemoteException
- On badness
VisADException
- On badnessprivate void setColorMaps() throws RemoteException, VisADException
VisADException
- VisAD failure.
RemoteException
- Java RMI failure.public void setDisplay(LocalDisplay display) throws DisplayException, VisADException, RemoteException
setDisplay
in class Displayable
display
- display to set this into
DisplayException
- Display type exception
RemoteException
- Java RMI error
VisADException
- problem creating VisAD objectpublic void setColorPalette(float[][] colorPalette) throws RemoteException, VisADException
setColorPalette
in class Displayable
colorPalette
- the color table or color-alpha table desired
VisADException
- if a core VisAD failure occurs.
RemoteException
- if a Java RMI failure occurs.public float[][] getColorPalette()
private void setColorsInControls(float[][] colorPalette) throws RemoteException, VisADException
colorPalette
- The 3xN color palette array
RemoteException
- Java RMI error
VisADException
- problem creating VisAD objectprivate void setColorsInControls(float[][] colorPalette, int colorMapIndex) throws RemoteException, VisADException
colorPalette
- The 3xN color palette arraycolorMapIndex
- Which of the color maps are we setting the color of.
RemoteException
- Java RMI error
VisADException
- problem creating VisAD objectprotected DataRenderer getDataRenderer() throws VisADException
getDataRenderer
in class DisplayableData
VisADException
public void setColoredByAnother(boolean yesno)
setColoredByAnother
in interface GridDisplayable
yesno
- true if colored by another
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |