public class GliderImage extends AVListImpl
| Modifier and Type | Class and Description | 
|---|---|
| protected class  | GliderImage.RegionListener | 
| Modifier and Type | Field and Description | 
|---|---|
| protected double | altitude | 
| protected List<LatLon> | corners | 
| static String | GLIDER_IMAGE_OPACITY | 
| static String | GLIDER_IMAGE_SOURCE | 
| static String | GLIDER_REGIONS_OF_INTEREST | 
| protected Object | imageSource | 
| protected String | name | 
| protected double | opacity | 
| protected PropertyChangeListener | regionListener | 
| protected Sector | sector | 
| Constructor and Description | 
|---|
| GliderImage(String name,
           ImageUtil.AlignedImage alignedImage,
           double altitude)Construct an image from a file or  BufferedImageand an arbitrary bounding region. | 
| GliderImage(String imageSource,
           Iterable<? extends LatLon> corners,
           double altitude)Construct an image from a file. | 
| GliderImage(String name,
           Object imageSource,
           Iterable<? extends LatLon> corners,
           double altitude)Construct an image from a file or  BufferedImageand an arbitrary bounding region. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | addRegionOfInterest(GliderRegionOfInterest region)Adds a region of interest to display on the image. | 
| static ImageUtil.AlignedImage | alignImage(BufferedImage sourceImage,
          float[] latitudes,
          float[] longitudes)Reprojects an image into an aligned image, one with edges of constant latitude and longitude. | 
| static void | alignImageDump(BufferedImage sourceImage,
              float[] latitudes,
              float[] longitudes) | 
| boolean | equals(Object o) | 
| double | getAltitude()Return the image's altitude. | 
| List<LatLon> | getCorners() | 
| Object | getImageSource()Returns the image source. | 
| String | getName()Returns the name of the image, as specified at construction. | 
| double | getOpacity() | 
| GliderRegionOfInterest.RegionSet | getRegionsOfInterest() | 
| Sector | getSector()Return the image's location. | 
| int | hashCode() | 
| void | releaseImageSource() | 
| void | removeRegionOfInterest(GliderRegionOfInterest region)Removes a region of interest. | 
| void | setImageSource(String newSource)Changes the image source. | 
| void | setImageSource(String newName,
              Object newSource)Changes the image source and gives the image a new name. | 
| void | setOpacity(double opacity) | 
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getBooleanValue, getBooleanValue, getChangeSupport, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, getRestorableStateForAVPair, getStringValue, getStringValue, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValuesprotected double altitude
public static final String GLIDER_IMAGE_OPACITY
public static final String GLIDER_IMAGE_SOURCE
public static final String GLIDER_REGIONS_OF_INTEREST
protected Object imageSource
protected String name
protected double opacity
protected PropertyChangeListener regionListener
protected Sector sector
public GliderImage(String name, ImageUtil.AlignedImage alignedImage, double altitude)
BufferedImage and an arbitrary bounding region.name - A unique name to identify the image. If the image source is a file, the file path can be used
                     as the name.alignedImage - An aligned image containing a BufferedImage and a Sector specifying the image
                     and the location to place it.The image will be stretched as necessary to fully fill the
                     region.altitude - The altitude at which to display the image. Specify 0 to have the image draped over the
                     globe's surface.IllegalArgumentException - if any of the first three arguments are null.public GliderImage(String imageSource, Iterable<? extends LatLon> corners, double altitude)
imageSource - The path to the source image. Images can be any of those supported by ImageIO, as well as uncompressed TIFF images..corners - The lat/lon locations of the region in which to map the image. The image will be stretched as
                    necessary to fully fill the region. The locations must be specified in counterclockwise order
                    beginning with the lower-left image corner.altitude - The altitude at which to display the image. Specify 0 to have the image draped over the
                    globe's surface.IllegalArgumentException - if any of the first three arguments are null.public GliderImage(String name, Object imageSource, Iterable<? extends LatLon> corners, double altitude)
BufferedImage and an arbitrary bounding region.name - A unique name to identify the image. If the image source is a file, the file path can be used
                    as the name.imageSource - Either the file path to the source image or a reference to the BufferedImage containing it. Images can be any of those supported by ImageIO, as well as uncompressed TIFF images.corners - The lat/lon locations of the region in which to map the image. The image will be stretched as
                    necessary to fully fill the region. The locations must be specified in counterclockwise order
                    beginning with the lower-left image corner.altitude - The altitude at which to display the image. Specify 0 to have the image draped over the
                    globe's surface.IllegalArgumentException - if any of the first three arguments are null.public void addRegionOfInterest(GliderRegionOfInterest region)
region - the region of interest to add.IllegalArgumentException - if region is null.public static ImageUtil.AlignedImage alignImage(BufferedImage sourceImage, float[] latitudes, float[] longitudes) throws InterruptedException
sourceImage - the image to reproject, typically a non-aligned imagelatitudes - an array identifying the latitude of each pixels if the source image. There must be an entry
                    in the array for all pixels. The values are taken to be in row-major order relative to the
                    image -- the horizontal component varies fastest.longitudes - an array identifying the longitude of each pixels if the source image. There must be an entry
                    in the array for all pixels. The values are taken to be in row-major order relative to the
                    image -- the horizontal component varies fastest.InterruptedException - if any thread has interrupted the current thread while alignImage is running. The
                              interrupted status of the current thread is cleared when this exception is
                              thrown.public static void alignImageDump(BufferedImage sourceImage, float[] latitudes, float[] longitudes)
public double getAltitude()
public Object getImageSource()
public String getName()
public double getOpacity()
public GliderRegionOfInterest.RegionSet getRegionsOfInterest()
public Sector getSector()
public void releaseImageSource()
public void removeRegionOfInterest(GliderRegionOfInterest region)
region - the region of interest to remove.IllegalArgumentException - if region is null.public void setImageSource(String newSource)
GliderImage(java.lang.String, java.lang.Object, java.lang.Iterable<? extends gov.nasa.worldwind.geom.LatLon>, double)newSource - the new image source.IllegalArgumentException - if newSource is null.public void setImageSource(String newName, Object newSource)
GliderImage(java.lang.String, java.lang.Object, java.lang.Iterable<? extends gov.nasa.worldwind.geom.LatLon>, double)newName - the new image name.newSource - the new image source.IllegalArgumentException - if either argument is null.public void setOpacity(double opacity)