Class ImageRGBDisplayable

All Implemented Interfaces:
GridDisplayable

public class ImageRGBDisplayable extends DisplayableData implements GridDisplayable
Provides support for a Displayable that needs a map to (Display.Red,Display.Green,Display.Blue)
Version:
$Revision: 1.17 $
Author:
IDV development team
  • Constructor Details

    • ImageRGBDisplayable

      public ImageRGBDisplayable(String name) throws VisADException, RemoteException
      Constructs from a name for the Displayable and the type of the RGB parameter.
      Parameters:
      name - The name for the displayable.
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
    • ImageRGBDisplayable

      public ImageRGBDisplayable(String name, boolean doAlpha) throws VisADException, RemoteException
      Constructs from a name for the Displayable and the type of the RGB parameter.
      Parameters:
      name - The name for the displayable.
      doAlpha - true to map to RGBA
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
    • ImageRGBDisplayable

      public ImageRGBDisplayable(String name, float[][] colorPalette, boolean doAlpha) throws VisADException, RemoteException
      Constructs from a name for the Displayable and the type of the RGB parameter.
      Parameters:
      name - The name for the displayable.
      colorPalette - The color palette
      doAlpha - true to map to RGBA
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
    • ImageRGBDisplayable

      public ImageRGBDisplayable(String name, float[][] colorPalette, boolean doAlpha, FieldImpl field) throws VisADException, RemoteException
      Constructs from a name for the Displayable and the type of the RGB parameter.
      Parameters:
      name - The name for the displayable.
      colorPalette - The color palette
      doAlpha - true to map to RGBA
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
    • ImageRGBDisplayable

      protected ImageRGBDisplayable(ImageRGBDisplayable that) throws VisADException, RemoteException
      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

    • loadData

      public void loadData(FieldImpl field) throws VisADException, RemoteException
      Set the data into the Displayable; set RGB Type
      Specified by:
      loadData in interface GridDisplayable
      Parameters:
      field - an image or sequence of images
      Throws:
      VisADException - from construction of VisAd objects
      RemoteException - from construction of VisAD objects
    • getColorTupleType

      public RealTupleType getColorTupleType()
      Get the RealTupleType of the RGB parameter.
      Returns:
      The RealTupleType of the RGB parameters. May be null.
    • setColorTupleType

      protected void setColorTupleType(RealTupleType realTupleType) throws RemoteException, VisADException
      Sets the RealTupleType of the RGB parameter.
      Parameters:
      realTupleType - The RealTupleType of the RGB parameters. May not be null.
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
    • getRGBRealTupleType

      public RealTupleType getRGBRealTupleType()
      Returns the RealTupleType of the RGB parameter.
      Returns:
      The RealTupleType of the color parameter. May be null. deprecated use getColorTupleType()
    • setScalarMaps

      protected void setScalarMaps(ScalarMapSet maps) throws BadMappingException
      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 with 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).
      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.
    • setAlpha

      public void setAlpha(float alpha) throws RemoteException, VisADException
      Set the alpha. Unused.
      Parameters:
      alpha - alpha
      Throws:
      RemoteException - On badness
      VisADException - On badness
    • setDisplay

      public void setDisplay(LocalDisplay display) throws DisplayException, VisADException, RemoteException
      Set the display.
      Overrides:
      setDisplay in class Displayable
      Parameters:
      display - display to set this into
      Throws:
      DisplayException - Display type exception
      RemoteException - Java RMI error
      VisADException - problem creating VisAD object
      See Also:
    • setColorPalette

      public void setColorPalette(float[][] colorPalette) 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.
      Overrides:
      setColorPalette in class Displayable
      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

      public float[][] getColorPalette()
      Return the current color palette in this Displayable
      Returns:
      a color table float[3][len] or color-alpha table float[4][len]
    • setColoredByAnother

      public void setColoredByAnother(boolean yesno)
      Set whether this GridDisplayable should have the data colored by another parameter. This implementation is a no-op.
      Specified by:
      setColoredByAnother in interface GridDisplayable
      Parameters:
      yesno - true if colored by another