public class BitmapVisualization
extends java.lang.Object
Constructor and Description |
---|
BitmapVisualization() |
Modifier and Type | Method and Description |
---|---|
static java.awt.image.BufferedImage |
drawBitmap(Bitmap bitmap,
int width,
int height)
Draws a
Bitmap instance as a BufferedImage. |
static java.awt.image.BufferedImage |
drawBitmap(Bitmap bitmap,
int width,
int height,
java.awt.Color color)
Draws a
Bitmap instance as a BufferedImage with a particular
color used to indicate the areas of the bitmap set to 1. |
static java.awt.image.BufferedImage |
drawGeoavailabilityGrid(GeoavailabilityGrid g)
Convenience function to draw a
GeoavailabilityGrid as a
BufferedImage . |
static java.awt.image.BufferedImage |
drawGeoavailabilityGrid(GeoavailabilityGrid g,
java.awt.Color color)
Convenience function to draw a
GeoavailabilityGrid as a
BufferedImage , with a specific color for the bits that are set
to 1. |
static java.awt.image.BufferedImage |
drawIterableMap(java.util.Iterator<java.lang.Integer> it,
int width,
int height)
Given an iterator of integer indices in a bit set, this method will draw
the visual representation of the set.
|
static java.awt.image.BufferedImage |
drawIterableMap(java.util.Iterator<java.lang.Integer> it,
int width,
int height,
java.awt.Color color)
Given an iterator of integer indices in a bit set, this method will draw
the visual representation of the set.
|
static void |
imageToFile(java.awt.image.BufferedImage image,
java.lang.String file)
Convenience function to write a BufferedImage to a file.
|
public static java.awt.image.BufferedImage drawBitmap(Bitmap bitmap, int width, int height)
Bitmap
instance as a BufferedImage.bitmap
- The bitmap to draw.width
- Number of bits to draw before wrapping to the next lineheight
- Number of scanlines in the bitmappublic static java.awt.image.BufferedImage drawBitmap(Bitmap bitmap, int width, int height, java.awt.Color color)
Bitmap
instance as a BufferedImage with a particular
color used to indicate the areas of the bitmap set to 1.bitmap
- The bitmap to draw.width
- Number of bits to draw before wrapping to the next lineheight
- Number of scanlines in the bitmapcolor
- Color
to use for bits that are set to 1.public static java.awt.image.BufferedImage drawGeoavailabilityGrid(GeoavailabilityGrid g)
GeoavailabilityGrid
as a
BufferedImage
.g
- GeoavailabilityGrid to drawpublic static java.awt.image.BufferedImage drawGeoavailabilityGrid(GeoavailabilityGrid g, java.awt.Color color)
GeoavailabilityGrid
as a
BufferedImage
, with a specific color for the bits that are set
to 1.g
- GeoavailabilityGrid to drawcolor
- Color
to use for bits that are set to 1.public static java.awt.image.BufferedImage drawIterableMap(java.util.Iterator<java.lang.Integer> it, int width, int height)
it
- Iterator of bit set indices.width
- Width of the output image.height
- Height of the output image.public static java.awt.image.BufferedImage drawIterableMap(java.util.Iterator<java.lang.Integer> it, int width, int height, java.awt.Color color)
it
- Iterator of bit set indices.width
- Width of the output image.height
- Height of the output image.color
- Color
of bits set to 1.public static void imageToFile(java.awt.image.BufferedImage image, java.lang.String file) throws java.io.IOException
java.io.IOException