|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bbn.openmap.omGraphics.util.ImageWarp
public class ImageWarp
The ImageTranslator is the object that takes a BufferedImage and creates an OMRaster from it based on a Projection object.
Field Summary | |
---|---|
protected GeoCoordTransformation |
geoTrans
A transformation for the projection of the source image. |
protected double |
hor_upp
Horizontal units/pixel in the source BufferedImage projection. |
protected double |
horOrigin
The horizontal origin pixel location in the source image for the coordinate system origin. |
protected int |
iheight
Image height, |
protected int |
iwidth
Image width, |
static java.util.logging.Logger |
logger
|
protected int[] |
pixels
Source image pixels. |
protected DataBounds |
projectedImageBounds
The coordinate image bounds of the projected image on the map window. |
protected DataBounds |
sourceImageBounds
The coordinate bounds of the image, represented in the coordinate system of the image. |
protected double |
ver_upp
Vertical units/pixel in the source BufferedImage projection. |
protected double |
verOrigin
The vertical origin pixel location in the source image for the coordinate system origin. |
Constructor Summary | |
---|---|
ImageWarp(java.awt.image.BufferedImage bi)
Create an image warp for an image assumed to be world wide coverage, with the top at 90 degrees, the bottom at -90, the left side at -180 and the right side at 180. |
|
ImageWarp(java.awt.image.BufferedImage bi,
GeoCoordTransformation transform,
DataBounds imageBounds)
Create an image warp with some additional transform information. |
|
ImageWarp(java.awt.image.BufferedImage bi,
GeoCoordTransformation transform,
WorldFile worldFile)
Create an image warp with some additional transform information. |
|
ImageWarp(int[] pix,
int width,
int height)
Create an image warp for an image assumed to be world wide coverage, with the top at 90 degrees, the bottom at -90, the left side at -180 and the right side at 180. |
|
ImageWarp(int[] pix,
int width,
int height,
GeoCoordTransformation transform,
DataBounds imageBounds)
Create an image warp with some additional transform information. |
|
ImageWarp(int[] pix,
int width,
int height,
GeoCoordTransformation transform,
WorldFile worldFile)
Create an image warp with some additional transform information. |
Method Summary | |
---|---|
DataBounds |
calculateProjectedImageBounds(Projection p)
Returns the image bounds of the image as it would be warped to the provided projection. |
GeoCoordTransformation |
getGeoTrans()
|
double |
getHor_dpp()
|
double |
getHorOrigin()
|
int |
getIheight()
|
DataBounds |
getImageBounds()
|
int[] |
getImagePixels(Projection p)
Given a projection, return the pixels for an image that will cover the projection area. |
int |
getIwidth()
|
OMRaster |
getOMRaster(Projection p)
Return an OMRaster that covers the given projection, with the image warped for the projection. |
protected int[] |
getPixels(java.awt.Image img,
int x,
int y,
int w,
int h)
Get the pixels from the BufferedImage. |
java.awt.Rectangle |
getProjectedImageBoundsForLastProjection()
Convenience function to get projected image bounds for an image that has been warped for a given projection. |
double |
getVer_dpp()
|
double |
getVerOrigin()
|
static void |
main(java.lang.String[] args)
|
void |
setGeoTrans(GeoCoordTransformation geoTrans)
|
void |
setHor_dpp(double hor_dpp)
|
void |
setHorOrigin(double horOrigin)
|
void |
setIheight(int iheight)
|
void |
setImageBounds(DataBounds imageBounds)
|
void |
setImageBounds(WorldFile worldFile)
|
void |
setIwidth(int iwidth)
|
void |
setVer_dpp(double ver_dpp)
|
void |
setVerOrigin(double verOrigin)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.util.logging.Logger logger
protected int[] pixels
protected int iwidth
protected int iheight
protected double hor_upp
protected double ver_upp
protected double verOrigin
protected double horOrigin
protected GeoCoordTransformation geoTrans
protected DataBounds sourceImageBounds
protected DataBounds projectedImageBounds
Constructor Detail |
---|
public ImageWarp(java.awt.image.BufferedImage bi)
public ImageWarp(java.awt.image.BufferedImage bi, GeoCoordTransformation transform, DataBounds imageBounds)
bi
- BufferedImage of the sourcetransform
- the GeoCoordTransformation for the projection of the
image.imageBounds
- the bounds of the image in the image's coordinate
system.public ImageWarp(java.awt.image.BufferedImage bi, GeoCoordTransformation transform, WorldFile worldFile)
bi
- BufferedImage of the sourcetransform
- the GeoCoordTransformation for the projection of the
image.worldFile
- the WorldFile describing the image's location.public ImageWarp(int[] pix, int width, int height)
pix
- ARGB array of pixel values for image.width
- pixel width of image.height
- pixel height of image.public ImageWarp(int[] pix, int width, int height, GeoCoordTransformation transform, DataBounds imageBounds)
pix
- ARGB array of pixel values for image.width
- pixel width of image.height
- pixel height of image.transform
- the GeoCoordTransformation for the projection of the
image.imageBounds
- the bounds of the image in the image's coordinate
system.public ImageWarp(int[] pix, int width, int height, GeoCoordTransformation transform, WorldFile worldFile)
pix
- ARGB array of pixel values for image.width
- pixel width of image.height
- pixel height of image.transform
- the GeoCoordTransformation for the projection of the
image.worldFile
- the WorldFile describing the image's location.Method Detail |
---|
public OMRaster getOMRaster(Projection p)
p
- map projection
public int[] getImagePixels(Projection p)
p
- map projection
public DataBounds calculateProjectedImageBounds(Projection p)
p
- Projection the image will be displayed on
public java.awt.Rectangle getProjectedImageBoundsForLastProjection()
protected int[] getPixels(java.awt.Image img, int x, int y, int w, int h)
public int getIwidth()
public void setIwidth(int iwidth)
public int getIheight()
public void setIheight(int iheight)
public double getHor_dpp()
public void setHor_dpp(double hor_dpp)
public double getVer_dpp()
public void setVer_dpp(double ver_dpp)
public double getVerOrigin()
public void setVerOrigin(double verOrigin)
public double getHorOrigin()
public void setHorOrigin(double horOrigin)
public GeoCoordTransformation getGeoTrans()
public void setGeoTrans(GeoCoordTransformation geoTrans)
public DataBounds getImageBounds()
public void setImageBounds(DataBounds imageBounds)
public void setImageBounds(WorldFile worldFile)
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |