com.bbn.openmap.plugin.earthImage
Class EarthImagePlugIn.ImageTranslator

java.lang.Object
  extended by com.bbn.openmap.plugin.earthImage.EarthImagePlugIn.ImageTranslator
Enclosing class:
EarthImagePlugIn

public class EarthImagePlugIn.ImageTranslator
extends java.lang.Object

The ImageTranslator is the object that takes the BufferedImage and creates the OMRaster from it based on a Projection object.


Field Summary
 float hor_dpp
          Horizontal degrees/pixel in the source BufferedImage.
 int horOrigin
          The horizontal origin pixel location in the source image for the coordinate system origin (0 degrees longitude).
 int iheight
          Image Icon height,
 int iwidth
          Image Icon width,
protected  int[] pixels
           
 float ver_dpp
          Vertical degrees/pixel in the source BufferedImage.
 int verOrigin
          The vertical origin pixel location in the source image for the coordinate system origin (0 degrees latitude).
 
Constructor Summary
EarthImagePlugIn.ImageTranslator(java.awt.image.BufferedImage bi)
          Create an image translator 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.
 
Method Summary
 OMRaster getImage(Projection p)
          Given a projection, create an OMRaster that reflects the image warped to that projection.
protected  int[] getPixels(java.awt.Image img, int x, int y, int w, int h)
          Get the pixels from the BufferedImage.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pixels

protected int[] pixels

iwidth

public int iwidth
Image Icon width,


iheight

public int iheight
Image Icon height,


hor_dpp

public float hor_dpp
Horizontal degrees/pixel in the source BufferedImage. Assumed to be constant across the image.


ver_dpp

public float ver_dpp
Vertical degrees/pixel in the source BufferedImage. Assumed to be constant across the image.


verOrigin

public int verOrigin
The vertical origin pixel location in the source image for the coordinate system origin (0 degrees latitude).


horOrigin

public int horOrigin
The horizontal origin pixel location in the source image for the coordinate system origin (0 degrees longitude).

Constructor Detail

EarthImagePlugIn.ImageTranslator

public EarthImagePlugIn.ImageTranslator(java.awt.image.BufferedImage bi)
Create an image translator 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. Assumes the origin point is in the middle of the image.

Method Detail

getImage

public OMRaster getImage(Projection p)
Given a projection, create an OMRaster that reflects the image warped to that projection.


getPixels

protected int[] getPixels(java.awt.Image img,
                          int x,
                          int y,
                          int w,
                          int h)
Get the pixels from the BufferedImage. If anything goes wrong, returns a int[0].



Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details