edu.jhu.pha.sdss.fits
Class SlowFITSImage

java.lang.Object
  extended byjava.awt.Image
      extended byjava.awt.image.BufferedImage
          extended byedu.jhu.pha.sdss.fits.FITSImage
              extended byedu.jhu.pha.sdss.fits.SlowFITSImage
All Implemented Interfaces:
java.awt.image.RenderedImage, java.awt.image.WritableRenderedImage

public class SlowFITSImage
extends FITSImage

   Current Version
   ===============
   ID:            $Id: SlowFITSImage.html,v 1.1 2004/07/23 22:04:49 carliles Exp $
   Revision:      $Revision: 1.1 $
   Date/time:     $Date: 2004/07/23 22:04:49 $
   


Nested Class Summary
static class SlowFITSImage.DataTypeNotSupportedException
           
static class SlowFITSImage.NoImageDataFoundException
           
 
Field Summary
 
Fields inherited from class edu.jhu.pha.sdss.fits.FITSImage
SCALE_ASINH, SCALE_HISTOGRAM_EQUALIZATION, SCALE_LINEAR, SCALE_LOG, SCALE_SQUARE, SCALE_SQUARE_ROOT
 
Fields inherited from class java.awt.image.BufferedImage
TYPE_3BYTE_BGR, TYPE_4BYTE_ABGR, TYPE_4BYTE_ABGR_PRE, TYPE_BYTE_BINARY, TYPE_BYTE_GRAY, TYPE_BYTE_INDEXED, TYPE_CUSTOM, TYPE_INT_ARGB, TYPE_INT_ARGB_PRE, TYPE_INT_BGR, TYPE_INT_RGB, TYPE_USHORT_555_RGB, TYPE_USHORT_565_RGB, TYPE_USHORT_GRAY
 
Fields inherited from class java.awt.Image
SCALE_AREA_AVERAGING, SCALE_DEFAULT, SCALE_FAST, SCALE_REPLICATE, SCALE_SMOOTH, UndefinedProperty
 
Constructor Summary
SlowFITSImage(java.io.File file)
           
SlowFITSImage(java.io.File file, int scaleMethod)
           
SlowFITSImage(nom.tam.fits.Fits fits)
           
SlowFITSImage(nom.tam.fits.Fits fits, java.awt.image.BufferedImage delegate, int scaleMethod)
           
SlowFITSImage(nom.tam.fits.Fits fits, int scaleMethod)
           
SlowFITSImage(java.lang.String filename)
           
SlowFITSImage(java.lang.String filename, int scaleMethod)
           
SlowFITSImage(java.net.URL url)
           
SlowFITSImage(java.net.URL url, int scaleMethod)
           
 
Method Summary
 java.awt.image.WritableRaster copyData(java.awt.image.WritableRaster outRaster)
           
 java.awt.Graphics2D createGraphics()
           
static java.awt.image.BufferedImage createScaledImage(nom.tam.fits.ImageHDU hdu, int scaleMethod)
           
static java.awt.image.BufferedImage createScaledImage(nom.tam.fits.ImageHDU hdu, short[] result, Histogram hist, double min, double max, double sigma, int scaleMethod)
           
 void flush()
           
 java.awt.image.WritableRaster getAlphaRaster()
           
 java.awt.image.ColorModel getColorModel()
           
 java.awt.image.Raster getData()
           
 java.awt.image.Raster getData(java.awt.Rectangle rect)
           
 nom.tam.fits.Fits getFits()
           
 java.awt.Graphics getGraphics()
           
 int getHeight()
           
 int getHeight(java.awt.image.ImageObserver observer)
           
 Histogram getHistogram()
           
 nom.tam.fits.ImageHDU getImageHDU()
           
 int getMinTileX()
           
 int getMinTileY()
           
 int getMinX()
           
 int getMinY()
           
 int getNumXTiles()
           
 int getNumYTiles()
           
 double getOriginalValue(int x, int y)
           
 java.lang.Object getProperty(java.lang.String name)
           
 java.lang.Object getProperty(java.lang.String name, java.awt.image.ImageObserver observer)
           
 java.lang.String[] getPropertyNames()
           
 java.awt.image.WritableRaster getRaster()
           
 int getRGB(int x, int y)
           
 int[] getRGB(int startX, int startY, int w, int h, int[] rgbArray, int offset, int scansize)
           
 java.awt.image.SampleModel getSampleModel()
           
 int getScaleMethod()
           
static java.lang.String[] getScaleNames()
           
 java.awt.image.ImageProducer getSource()
           
 java.util.Vector getSources()
           
 java.awt.image.BufferedImage getSubimage(int x, int y, int w, int h)
           
 java.awt.image.Raster getTile(int tileX, int tileY)
           
 int getTileGridXOffset()
           
 int getTileGridYOffset()
           
 int getTileHeight()
           
 int getTileWidth()
           
 int getType()
           
 int getWidth()
           
 int getWidth(java.awt.image.ImageObserver observer)
           
 java.awt.image.WritableRaster getWritableTile(int tileX, int tileY)
           
 java.awt.Point[] getWritableTileIndices()
           
 boolean hasTileWriters()
           
 boolean isAlphaPremultiplied()
           
 boolean isTileWritable(int tileX, int tileY)
           
 void releaseWritableTile(int tileX, int tileY)
           
 void rescale(double min, double max, double sigma)
          Rescales the image with the given min and max range values.
static java.lang.String revision()
           
 void setData(java.awt.image.Raster r)
           
 void setRGB(int x, int y, int rgb)
           
 void setRGB(int startX, int startY, int w, int h, int[] rgbArray, int offset, int scansize)
           
 void setScaleMethod(int scaleMethod)
          scaleMethod must be one of SCALE_LINEAR, SCALE_LOG, etc.
 java.lang.String toString()
           
 
Methods inherited from class edu.jhu.pha.sdss.fits.FITSImage
createScaledImages, createScaledImages
 
Methods inherited from class java.awt.image.BufferedImage
addTileObserver, coerceData, removeTileObserver
 
Methods inherited from class java.awt.Image
getScaledInstance
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SlowFITSImage

public SlowFITSImage(nom.tam.fits.Fits fits)
              throws nom.tam.fits.FitsException,
                     SlowFITSImage.DataTypeNotSupportedException,
                     SlowFITSImage.NoImageDataFoundException,
                     java.io.IOException

SlowFITSImage

public SlowFITSImage(nom.tam.fits.Fits fits,
                     int scaleMethod)
              throws nom.tam.fits.FitsException,
                     SlowFITSImage.DataTypeNotSupportedException,
                     SlowFITSImage.NoImageDataFoundException,
                     java.io.IOException

SlowFITSImage

public SlowFITSImage(nom.tam.fits.Fits fits,
                     java.awt.image.BufferedImage delegate,
                     int scaleMethod)
              throws nom.tam.fits.FitsException,
                     SlowFITSImage.DataTypeNotSupportedException,
                     SlowFITSImage.NoImageDataFoundException,
                     java.io.IOException

SlowFITSImage

public SlowFITSImage(java.io.File file)
              throws nom.tam.fits.FitsException,
                     SlowFITSImage.DataTypeNotSupportedException,
                     SlowFITSImage.NoImageDataFoundException,
                     java.io.IOException

SlowFITSImage

public SlowFITSImage(java.io.File file,
                     int scaleMethod)
              throws nom.tam.fits.FitsException,
                     SlowFITSImage.DataTypeNotSupportedException,
                     SlowFITSImage.NoImageDataFoundException,
                     java.io.IOException

SlowFITSImage

public SlowFITSImage(java.lang.String filename)
              throws nom.tam.fits.FitsException,
                     SlowFITSImage.DataTypeNotSupportedException,
                     SlowFITSImage.NoImageDataFoundException,
                     java.io.IOException

SlowFITSImage

public SlowFITSImage(java.lang.String filename,
                     int scaleMethod)
              throws nom.tam.fits.FitsException,
                     SlowFITSImage.DataTypeNotSupportedException,
                     SlowFITSImage.NoImageDataFoundException,
                     java.io.IOException

SlowFITSImage

public SlowFITSImage(java.net.URL url)
              throws nom.tam.fits.FitsException,
                     SlowFITSImage.DataTypeNotSupportedException,
                     SlowFITSImage.NoImageDataFoundException,
                     java.io.IOException

SlowFITSImage

public SlowFITSImage(java.net.URL url,
                     int scaleMethod)
              throws nom.tam.fits.FitsException,
                     SlowFITSImage.DataTypeNotSupportedException,
                     SlowFITSImage.NoImageDataFoundException,
                     java.io.IOException
Method Detail

getScaleNames

public static java.lang.String[] getScaleNames()

getFits

public nom.tam.fits.Fits getFits()
Overrides:
getFits in class FITSImage

getImageHDU

public nom.tam.fits.ImageHDU getImageHDU()
Overrides:
getImageHDU in class FITSImage

getHistogram

public Histogram getHistogram()
Overrides:
getHistogram in class FITSImage

getOriginalValue

public double getOriginalValue(int x,
                               int y)
                        throws nom.tam.fits.FitsException
Overrides:
getOriginalValue in class FITSImage
Returns:
The actual data value at postion (x, y), with bZero and bScale applied.
Throws:
nom.tam.fits.FitsException

getScaleMethod

public int getScaleMethod()
Overrides:
getScaleMethod in class FITSImage
Returns:
One of SCALE_LINEAR, SCALE_LOG, etc.

setScaleMethod

public void setScaleMethod(int scaleMethod)
Description copied from class: FITSImage
scaleMethod must be one of SCALE_LINEAR, SCALE_LOG, etc. The image must be redrawn after this method is called for the change to be visible.

Overrides:
setScaleMethod in class FITSImage

rescale

public void rescale(double min,
                    double max,
                    double sigma)
Description copied from class: FITSImage
Rescales the image with the given min and max range values. sigma is used for the inverse hyperbolic sine scaling as the value (in the range of the data values with bZero and bScale applied) at which the behavior becomes more logarithmic and less linear. The image must be redrawn after this method is called for the change to be visible.

Overrides:
rescale in class FITSImage

copyData

public java.awt.image.WritableRaster copyData(java.awt.image.WritableRaster outRaster)
Specified by:
copyData in interface java.awt.image.RenderedImage
Overrides:
copyData in class FITSImage

createGraphics

public java.awt.Graphics2D createGraphics()
Overrides:
createGraphics in class FITSImage

flush

public void flush()
Overrides:
flush in class FITSImage

getAlphaRaster

public java.awt.image.WritableRaster getAlphaRaster()
Overrides:
getAlphaRaster in class FITSImage

getColorModel

public java.awt.image.ColorModel getColorModel()
Specified by:
getColorModel in interface java.awt.image.RenderedImage
Overrides:
getColorModel in class FITSImage

getData

public java.awt.image.Raster getData()
Specified by:
getData in interface java.awt.image.RenderedImage
Overrides:
getData in class FITSImage

getData

public java.awt.image.Raster getData(java.awt.Rectangle rect)
Specified by:
getData in interface java.awt.image.RenderedImage
Overrides:
getData in class FITSImage

getGraphics

public java.awt.Graphics getGraphics()
Overrides:
getGraphics in class FITSImage

getHeight

public int getHeight()
Specified by:
getHeight in interface java.awt.image.RenderedImage
Overrides:
getHeight in class FITSImage

getHeight

public int getHeight(java.awt.image.ImageObserver observer)
Overrides:
getHeight in class FITSImage

getMinTileX

public int getMinTileX()
Specified by:
getMinTileX in interface java.awt.image.RenderedImage
Overrides:
getMinTileX in class FITSImage

getMinTileY

public int getMinTileY()
Specified by:
getMinTileY in interface java.awt.image.RenderedImage
Overrides:
getMinTileY in class FITSImage

getMinX

public int getMinX()
Specified by:
getMinX in interface java.awt.image.RenderedImage
Overrides:
getMinX in class FITSImage

getMinY

public int getMinY()
Specified by:
getMinY in interface java.awt.image.RenderedImage
Overrides:
getMinY in class FITSImage

getNumXTiles

public int getNumXTiles()
Specified by:
getNumXTiles in interface java.awt.image.RenderedImage
Overrides:
getNumXTiles in class FITSImage

getNumYTiles

public int getNumYTiles()
Specified by:
getNumYTiles in interface java.awt.image.RenderedImage
Overrides:
getNumYTiles in class FITSImage

getProperty

public java.lang.Object getProperty(java.lang.String name)
Specified by:
getProperty in interface java.awt.image.RenderedImage
Overrides:
getProperty in class FITSImage

getProperty

public java.lang.Object getProperty(java.lang.String name,
                                    java.awt.image.ImageObserver observer)
Overrides:
getProperty in class FITSImage

getPropertyNames

public java.lang.String[] getPropertyNames()
Specified by:
getPropertyNames in interface java.awt.image.RenderedImage
Overrides:
getPropertyNames in class FITSImage

getRaster

public java.awt.image.WritableRaster getRaster()
Overrides:
getRaster in class FITSImage

getRGB

public int getRGB(int x,
                  int y)
Overrides:
getRGB in class FITSImage

getRGB

public int[] getRGB(int startX,
                    int startY,
                    int w,
                    int h,
                    int[] rgbArray,
                    int offset,
                    int scansize)
Overrides:
getRGB in class FITSImage

getSampleModel

public java.awt.image.SampleModel getSampleModel()
Specified by:
getSampleModel in interface java.awt.image.RenderedImage
Overrides:
getSampleModel in class FITSImage

getSource

public java.awt.image.ImageProducer getSource()
Overrides:
getSource in class FITSImage

getSources

public java.util.Vector getSources()
Specified by:
getSources in interface java.awt.image.RenderedImage
Overrides:
getSources in class FITSImage

getSubimage

public java.awt.image.BufferedImage getSubimage(int x,
                                                int y,
                                                int w,
                                                int h)
Overrides:
getSubimage in class FITSImage

getTile

public java.awt.image.Raster getTile(int tileX,
                                     int tileY)
Specified by:
getTile in interface java.awt.image.RenderedImage
Overrides:
getTile in class FITSImage

getTileGridXOffset

public int getTileGridXOffset()
Specified by:
getTileGridXOffset in interface java.awt.image.RenderedImage
Overrides:
getTileGridXOffset in class FITSImage

getTileGridYOffset

public int getTileGridYOffset()
Specified by:
getTileGridYOffset in interface java.awt.image.RenderedImage
Overrides:
getTileGridYOffset in class FITSImage

getTileHeight

public int getTileHeight()
Specified by:
getTileHeight in interface java.awt.image.RenderedImage
Overrides:
getTileHeight in class FITSImage

getTileWidth

public int getTileWidth()
Specified by:
getTileWidth in interface java.awt.image.RenderedImage
Overrides:
getTileWidth in class FITSImage

getType

public int getType()
Overrides:
getType in class FITSImage

getWidth

public int getWidth()
Specified by:
getWidth in interface java.awt.image.RenderedImage
Overrides:
getWidth in class FITSImage

getWidth

public int getWidth(java.awt.image.ImageObserver observer)
Overrides:
getWidth in class FITSImage

getWritableTile

public java.awt.image.WritableRaster getWritableTile(int tileX,
                                                     int tileY)
Specified by:
getWritableTile in interface java.awt.image.WritableRenderedImage
Overrides:
getWritableTile in class FITSImage

getWritableTileIndices

public java.awt.Point[] getWritableTileIndices()
Specified by:
getWritableTileIndices in interface java.awt.image.WritableRenderedImage
Overrides:
getWritableTileIndices in class FITSImage

hasTileWriters

public boolean hasTileWriters()
Specified by:
hasTileWriters in interface java.awt.image.WritableRenderedImage
Overrides:
hasTileWriters in class FITSImage

isAlphaPremultiplied

public boolean isAlphaPremultiplied()
Overrides:
isAlphaPremultiplied in class FITSImage

isTileWritable

public boolean isTileWritable(int tileX,
                              int tileY)
Specified by:
isTileWritable in interface java.awt.image.WritableRenderedImage
Overrides:
isTileWritable in class FITSImage

releaseWritableTile

public void releaseWritableTile(int tileX,
                                int tileY)
Specified by:
releaseWritableTile in interface java.awt.image.WritableRenderedImage
Overrides:
releaseWritableTile in class FITSImage

setData

public void setData(java.awt.image.Raster r)
Specified by:
setData in interface java.awt.image.WritableRenderedImage
Overrides:
setData in class FITSImage

setRGB

public void setRGB(int x,
                   int y,
                   int rgb)
Overrides:
setRGB in class FITSImage

setRGB

public void setRGB(int startX,
                   int startY,
                   int w,
                   int h,
                   int[] rgbArray,
                   int offset,
                   int scansize)
Overrides:
setRGB in class FITSImage

toString

public java.lang.String toString()
Overrides:
toString in class FITSImage

createScaledImage

public static java.awt.image.BufferedImage createScaledImage(nom.tam.fits.ImageHDU hdu,
                                                             int scaleMethod)
                                                      throws nom.tam.fits.FitsException,
                                                             SlowFITSImage.DataTypeNotSupportedException
Returns:
An array of BufferedImages from hdu with intensity values scaled to short range using linear, log, square root, and square scales, in that order.
Throws:
nom.tam.fits.FitsException
SlowFITSImage.DataTypeNotSupportedException

createScaledImage

public static java.awt.image.BufferedImage createScaledImage(nom.tam.fits.ImageHDU hdu,
                                                             short[] result,
                                                             Histogram hist,
                                                             double min,
                                                             double max,
                                                             double sigma,
                                                             int scaleMethod)
                                                      throws nom.tam.fits.FitsException,
                                                             SlowFITSImage.DataTypeNotSupportedException
Throws:
nom.tam.fits.FitsException
SlowFITSImage.DataTypeNotSupportedException

revision

public static java.lang.String revision()
Returns:
CVS Revision number.