Package edu.wisc.ssec.mcidasv.data.hydra
Class HydraRGBDisplayable
java.lang.Object
ucar.visad.display.Displayable
ucar.visad.display.DisplayableData
edu.wisc.ssec.mcidasv.data.hydra.HydraRGBDisplayable
-
Nested Class Summary
Nested classes/interfaces inherited from class ucar.visad.display.DisplayableData
DisplayableData.DragAdapter -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanflag for whether alpha is used or notprivate ScalarMapfield index to Animation ScalarMapstatic final StringThe name of the "color palette" property.private BaseColorControlcontrol for ScalarMapprivate ScalarMapcolor ScalarMapprivate float[][]Color Paletteprivate Stringprivate intdefault curvedSizeprivate doublehigh range for colorsprivate doublehigh range for selectprivate RealTypeRealType for the Animation ScalarMapprivate doublelow range for colorsprivate doublelow range for selectprivate doublehigh range for select mapprivate doublelow range for select mapprivate HydraControlprivate floatlocal point sizestatic final intThe polygon fill stylestatic final intThe polygon line stylestatic final intThe polygon point styleprivate intdefault polygonModestatic final StringThe name of the "RGB real-type" property.private RealTypeRealType for the ScalarMapprivate RangeControlControl for select rangeprivate ScalarMapRealType for the SelectRange ScalarMapprivate RealTypeRealType for the SelectRange ScalarMapprivate booleanFields inherited from class ucar.visad.display.DisplayableData
LINE_WIDTH, MANIPULABLE, renderer, VISIBLEFields inherited from class ucar.visad.display.Displayable
DISPLAY, parent, SCALAR_MAP_SET -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructs from another instance.HydraRGBDisplayable(String name, RealType rgbRealType, RealType indexRealType, boolean alphaflag, HydraControl multiSpecCntrl) Constructs from a name for the Displayable and the type of the RGB parameter.HydraRGBDisplayable(String name, RealType rgbRealType, RealType indexRealType, float[][] colorPalette, boolean alphaflag, Range initRange, HydraControl multiSpecCntrl) HydraRGBDisplayable(String name, RealType rgbRealType, RealType indexRealType, float[][] colorPalette, String colorPaletteName, boolean alphaflag, Range initRange, HydraControl multiSpecCntrl) Constructs from a name for the Displayable and the type of the RGB parameter. -
Method Summary
Modifier and TypeMethodDescriptionprivate voidApply the correct unit (either the displayUnit or the colorUnit) to the scalar mapprivate intconvertToVisADPolygonMode(int myMode) Converts an RGBDisplayable Polygon mode to the appropriate (or default) VisAD modefloat[][]Return the current color palette in this DisplayableintReturn the size of a curved textureprotected DataRendererfloatGets the point size associated with this LineDrawingintReturn the type of polygon mode being useddouble[]Deprecated.use #getRangeForColor()double[]Get the color rangeReturns the RealType of the RGB parameter.Returns the RealType of the SelectRange parameter.booleanhasRange()Returns whether this Displayable has a valid range (i.e., lowRange and highRange are both not NaN'sbooleanReturns whether this Displayable has a valid range (i.e., lowSelectedRange and highSelectedRange are both not NaN'sprivate booleanCheck to see if the range has been set for the selectprotected ConstantMapmakeCurvedSizeMap(int curvedSize) Create the ConstantMap for the texture curve sizevoidMake a color palette representing this color and set it as the color pallete.private voidcreates the ScalarMap for color and ColorControl for this Displayable.voidsetColorPalette(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; asigns null (doesn't have a name) for the name.voidsetColorPalette(float[][] colorPalette, String name) 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.voidsetColorUnit(Unit unit) Set the units for the displayed rangevoidsetCurvedSize(int curvedSize) Set the curved size for textured displaysvoidvoidsetDisplayUnit(Unit unit) Set the units for the displayed rangefinal voidThis method sets the color palette to shades of grey.voidvoidsetPointSize(float pointSize) Sets the size of points in this Displayable.voidsetPolygonMode(int polygonMode) Set the type of polygon display that should be usedvoidsetRange(double low, double hi) Deprecated.use setRangeForColorvoidsetRangeForColor(double low, double hi) Set the upper and lower limit of the range values associated with a color table.voidsetRangeForSelect(double low, double hi) Set the upper and lower limit of the range values associated with a color table.voidsetRGBRealType(RealType realType) Sets the RealType of the RGB parameter.protected voidsetScalarMaps(ScalarMapSet maps) Sets the set of ScalarMap-s of this instance.voidsetSelectedRange(double low, double hi) Set selected range with the range for selectprivate voidprivate voidcreates the ScalarMap for SelectRange and control for this Displayable.protected voidsetSelectRealType(RealType realType) Sets the RealType of the select parameter.final voidThis method with no argument sets the default Vis5D color spectrum.protected booleanDoes this object use the displayUnit (or the colorUnit) for its display unit.Methods inherited from class ucar.visad.display.DisplayableData
addAction, cloneForDisplay, dataChange, destroy, getActive, getAnimationSet, getData, getLineWidth, getName, hasData, hasDataObject, isManipulable, isPickable, myAddConstantMaps, myAddDataReferences, myRemoveDataReferences, removeAction, setActive, setData, setDataReference, setDragAdapter, setLineWidth, setManipulable, setPickable, setPointMode, setUseFastRendering, setVisible, showme, toStringMethods inherited from class ucar.visad.display.Displayable
addConstantMap, 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, setColorPalette, setConstantPosition, setContourInfo, setDisplay, setDisplayActive, setDisplayInactive, setDisplayMaster, setOverrideAnimationSet, setOverrideAnimationSet, setParent, setRangeForColor, setScalarMapSet, setSelectedRange, setUseTimesInAnimation, toFront
-
Field Details
-
COLOR_PALETTE
The name of the "color palette" property.- See Also:
-
RGB_REAL_TYPE
The name of the "RGB real-type" property.- See Also:
-
POLYGON_FILL
The polygon fill style- See Also:
-
POLYGON_LINE
The polygon line style- See Also:
-
POLYGON_POINT
The polygon point style- See Also:
-
colorPalette
Color Palette -
colorPaletteName
-
colorMap
color ScalarMap -
animMap
field index to Animation ScalarMap -
colorControl
control for ScalarMap -
rgbRealType
RealType for the ScalarMap -
selectMap
RealType for the SelectRange ScalarMap -
indexRealType
RealType for the Animation ScalarMap -
selectControl
Control for select range -
selectRealType
RealType for the SelectRange ScalarMap -
alphaflag
flag for whether alpha is used or not -
myPointSize
local point size -
lowRange
low range for colors -
highRange
high range for colors -
polygonMode
default polygonMode -
curvedSize
default curvedSize -
lowSelectedRange
low range for select -
highSelectedRange
high range for select -
minSelect
low range for select map -
maxSelect
high range for select map -
multiSpecCntrl
-
useDefaultRenderer
-
-
Constructor Details
-
HydraRGBDisplayable
public HydraRGBDisplayable(String name, RealType rgbRealType, RealType indexRealType, boolean alphaflag, HydraControl multiSpecCntrl) throws VisADException, RemoteException Constructs from a name for the Displayable and the type of the RGB parameter.- Parameters:
name- The name for the displayable.rgbRealType- The type of the RGB parameter. May benull.alphaflag- boolean - will use Display.RBGA if true otherwise only Display.RGB- Throws:
VisADException- VisAD failure.RemoteException- Java RMI failure.
-
HydraRGBDisplayable
public HydraRGBDisplayable(String name, RealType rgbRealType, RealType indexRealType, float[][] colorPalette, boolean alphaflag, Range initRange, HydraControl multiSpecCntrl) throws VisADException, RemoteException - Throws:
VisADExceptionRemoteException
-
HydraRGBDisplayable
public HydraRGBDisplayable(String name, RealType rgbRealType, RealType indexRealType, float[][] colorPalette, String colorPaletteName, boolean alphaflag, Range initRange, HydraControl multiSpecCntrl) throws VisADException, RemoteException Constructs from a name for the Displayable and the type of the RGB parameter.- Parameters:
name- The name for the displayable.rgbRealType- The type of the RGB parameter. May benull.colorPalette- The initial colorPalette to use. May benull(Vis5D palette used as default).alphaflag- boolean - use Display.RBGA if trueinitRange- Range to use as initial or first min,max- Throws:
VisADException- VisAD failure.RemoteException- Java RMI failure.
-
HydraRGBDisplayable
Constructs from another instance. The following attributes are set from the other instance: color palette, the color RealType.- Parameters:
that- The other instance.- Throws:
VisADException- VisAD failure.RemoteException- Java RMI failure.
-
-
Method Details
-
useDisplayUnitForColor
Does this object use the displayUnit (or the colorUnit) for its display unit. The default is true. This allows derived classes to have this class use the colorUnit.- Returns:
- true if the display unit is the same as the color unit
-
setRGBRealType
Sets the RealType of the RGB parameter.- Parameters:
realType- The RealType of the RGB parameter. May not benull.- Throws:
VisADException- VisAD failure.RemoteException- Java RMI failure.
-
getColorMap
-
getAnimationMap
-
getRGBRealType
Returns the RealType of the RGB parameter.- Returns:
- The RealType of the color parameter. May
be
null.
-
getSelectRealType
Returns the RealType of the SelectRange parameter.- Returns:
- The RealType of the select range parameter. May
be
null.
-
getDataRenderer
- Overrides:
getDataRendererin classDisplayableData- Throws:
VisADException
-
setDefaultRenderer
-
setImageRenderer
-
setScalarMaps
Sets the set of ScalarMap-s of this instance. The ScalarMap-s of this instance will be added to the set before the SCALAR_MAP_SET property is set. This method fires a PropertyChangeEvent for SCALAR_MAP_SET withnullfor 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 invokesuper.setScalarMaps(ScalarMapSet).- Parameters:
maps- The set of ScalarMap-s to be added.- Throws:
BadMappingException- The RealType of the color parameter has not been set or its ScalarMap is alread in the set.
-
setColorPalette
public void setColorPalette(float[][] colorPalette, String name) throws RemoteException, VisADException 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.- Parameters:
colorPalette- Color table or color-alpha table desired.name- Name for the color table (can benull).- Throws:
VisADException- if a core VisAD failure occurs.RemoteException- if a Java RMI failure occurs.
-
setColorPalette
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; asigns null (doesn't have a name) for the name.- Overrides:
setColorPalettein classDisplayable- Parameters:
colorPalette- the color table or color-alpha table desired- Throws:
VisADException- if a core VisAD failure occurs.RemoteException- if a Java RMI failure occurs.
-
getColorPalette
Return the current color palette in this Displayable- Returns:
- a color table float[3][len] or color-alpha table float[4][len]
-
getColorPaletteName
-
setColor
Make a color palette representing this color and set it as the color pallete.- Overrides:
setColorin classDisplayable- Parameters:
color- color to use- Throws:
VisADException- VisAD failure.RemoteException- Java RMI failure.
-
setGreyPalette
This method sets the color palette to shades of grey.- Throws:
VisADException- if a core VisAD failure occurs.RemoteException- if a Java RMI failure occurs.
-
setVisADPalette
This method with no argument sets the default Vis5D color spectrum.- Throws:
VisADException- if a core VisAD failure occurs.RemoteException- if a Java RMI failure occurs.
-
setRange
Deprecated.use setRangeForColorSet the upper and lower limit of the range values associated with a color table.- Parameters:
low- the minimun valuehi- the maximum value- Throws:
RemoteException- Java RMI errorVisADException- problem creating VisAD object
-
setRangeForColor
Set the upper and lower limit of the range values associated with a color table. Matches method name in Contour2DDisplayable- Overrides:
setRangeForColorin classDisplayable- Parameters:
low- The minimum value of the parameter matched to the low end of the color table.hi- The maximum value of the parameter matched to the high end of the color table.- Throws:
VisADException- VisAD failure.RemoteException- Java RMI failure.
-
getRangeforColor
Deprecated.use #getRangeForColor()Get the color range- Returns:
- an array of the low and high values for the range
-
getRangeForColor
Get the color range- Returns:
- an array of the low and high values for the range
-
applyUnit
private void applyUnit(ScalarMap colorMap, RealType rgbRealType) throws VisADException, RemoteException Apply the correct unit (either the displayUnit or the colorUnit) to the scalar map- Parameters:
colorMap- ScalarMap to apply torgbRealType- RealType for default Unit- Throws:
RemoteException- Java RMI errorVisADException- problem creating VisAD object
-
setDisplayUnit
Set the units for the displayed range- Overrides:
setDisplayUnitin classDisplayable- Parameters:
unit- Unit for display- Throws:
RemoteException- Java RMI errorVisADException- problem creating VisAD object
-
setColorUnit
Set the units for the displayed range- Overrides:
setColorUnitin classDisplayable- Parameters:
unit- Unit for display- Throws:
RemoteException- Java RMI errorVisADException- problem creating VisAD object
-
hasRange
Returns whether this Displayable has a valid range (i.e., lowRange and highRange are both not NaN's- Returns:
- true if range has been set
-
setPointSize
Sets the size of points in this Displayable.- Overrides:
setPointSizein classDisplayableData- Parameters:
pointSize- Size of points (2 = normal)- Throws:
VisADException- VisAD failure.RemoteException- Java RMI failure.
-
getPointSize
Gets the point size associated with this LineDrawing- Overrides:
getPointSizein classDisplayableData- Returns:
- point size
-
setPolygonMode
Set the type of polygon display that should be used- Parameters:
polygonMode- polygon mode- Throws:
RemoteException- Java RMI errorVisADException- problem creating VisAD object
-
convertToVisADPolygonMode
Converts an RGBDisplayable Polygon mode to the appropriate (or default) VisAD mode- Parameters:
myMode- polygon mode- Returns:
- Java3D mode
-
getPolygonMode
Return the type of polygon mode being used- Returns:
- polygon mode
-
setCurvedSize
Set the curved size for textured displays- Parameters:
curvedSize- size to use (> 0)- Throws:
RemoteException- Java RMI errorVisADException- problem creating VisAD object
-
makeCurvedSizeMap
Create the ConstantMap for the texture curve size- Parameters:
curvedSize- size for texture curve- Returns:
- ConstantMap
- Throws:
RemoteException- Java RMI errorVisADException- problem creating VisAD object
-
getCurvedSize
Return the size of a curved texture- Returns:
- curved size
-
setColorMaps
creates the ScalarMap for color and ColorControl for this Displayable.- Throws:
VisADException- VisAD failure.RemoteException- Java RMI failure.
-
setSelectMap
- Throws:
RemoteExceptionVisADException
-
setSelectRealType
Sets the RealType of the select parameter.- Parameters:
realType- The RealType of the RGB parameter. May not benull.- Throws:
VisADException- VisAD failure.RemoteException- Java RMI failure.
-
hasSelectedRange
Returns whether this Displayable has a valid range (i.e., lowSelectedRange and highSelectedRange are both not NaN's- Returns:
- true if range has been set
-
setSelectedRange
Set selected range with the range for select- Overrides:
setSelectedRangein classDisplayable- Parameters:
low- low select valuehi- hi select value- Throws:
RemoteException- Java RMI errorVisADException- problem creating VisAD object
-
setRangeForSelect
Set the upper and lower limit of the range values associated with a color table.- Parameters:
low- the minimun valuehi- the maximum value- Throws:
RemoteException- Java RMI errorVisADException- problem creating VisAD object
-
hasSelectMinMax
Check to see if the range has been set for the select- Returns:
- true if it has
-
setSelectMaps
creates the ScalarMap for SelectRange and control for this Displayable.- Throws:
VisADException- VisAD failure.RemoteException- Java RMI failure.
-