public class ImageWarp
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
protected DataBounds |
calculateProjectedImageBounds(Projection p) |
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.
|
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) |
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
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.public OMRaster getOMRaster(Projection p)
p
- map projectionpublic int[] getImagePixels(Projection p)
p
- map projectionprotected DataBounds calculateProjectedImageBounds(Projection p)
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)
Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details