edu.pdx.starview.imaging
Class ImageMap

java.lang.Object
  extended byedu.pdx.starview.imaging.ImageMap

public class ImageMap
extends java.lang.Object

Used to generate images of the sky based on image-size/locaiton specs, and azimuth/altutdes of objects in the sky.

Author:
Zach Koziol, Dave Camarillo

Constructor Summary
ImageMap(int w, int h, SVAngle CenterAz, SVAngle CenterAlt, SVAngle imageAngle)
          Used to create images of the sky based on azimuth and altitude of the objects in the sky, and based on what direction your looking.
 
Method Summary
 void drawStar(int posX, int posY, int size)
          Deprecated.  
 void drawStar(SVAngle CurrentAz, SVAngle CurrentAlt)
          Deprecated.  
 void drawStar(SVAngle objectAzIn, SVAngle objectAltIn, SVSkyObject objectInfo)
          Draws a point in the sky where a star or planet will be.
 java.awt.image.BufferedImage getBufferedImage()
           
 java.awt.Graphics2D getGraphics2D()
           
 void writeFile(java.io.File outfile)
          Saves the image to a PNG file.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageMap

public ImageMap(int w,
                int h,
                SVAngle CenterAz,
                SVAngle CenterAlt,
                SVAngle imageAngle)
Used to create images of the sky based on azimuth and altitude of the objects in the sky, and based on what direction your looking.

Parameters:
w - Width of image to be created
h - Height of image to be createed.
CenterAz - The center azimuth of the angle.
CenterAlt - The center altitude of the angle.
imageAngle - The angular width that the image should cover.
Method Detail

getGraphics2D

public java.awt.Graphics2D getGraphics2D()
Returns:
Regurns the 2D graphics object representing this image

getBufferedImage

public java.awt.image.BufferedImage getBufferedImage()
Returns:
A BufferedImage of the image generated.

writeFile

public void writeFile(java.io.File outfile)
               throws java.lang.Exception
Saves the image to a PNG file.

Parameters:
outfile - The filename to save it to.
Throws:
java.lang.Exception

drawStar

public void drawStar(int posX,
                     int posY,
                     int size)
Deprecated.  


drawStar

public void drawStar(SVAngle CurrentAz,
                     SVAngle CurrentAlt)
              throws java.lang.Exception
Deprecated.  

Parameters:
CurrentAz - Azimuth of point to be drawn
CurrentAlt - Altitude of point to be drawn
Throws:
java.lang.Exception

drawStar

public void drawStar(SVAngle objectAzIn,
                     SVAngle objectAltIn,
                     SVSkyObject objectInfo)
              throws java.lang.Exception
Draws a point in the sky where a star or planet will be.

Parameters:
objectInfo - Indicator of color and size of object to be drawn
Throws:
java.lang.Exception