Facemorph.haar
Class BufferedImg

java.lang.Object
  extended by java.awt.Image
      extended by java.awt.image.BufferedImage
          extended by Facemorph.haar.BufferedImg
All Implemented Interfaces:
java.awt.image.RenderedImage, java.awt.image.WritableRenderedImage, java.awt.Transparency

public class BufferedImg
extends java.awt.image.BufferedImage

A floating point image class


Field Summary
 
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
accelerationPriority, SCALE_AREA_AVERAGING, SCALE_DEFAULT, SCALE_FAST, SCALE_REPLICATE, SCALE_SMOOTH, UndefinedProperty
 
Fields inherited from interface java.awt.Transparency
BITMASK, OPAQUE, TRANSLUCENT
 
Constructor Summary
BufferedImg(java.awt.image.BufferedImage pic)
          Create a buffered image object
BufferedImg(java.awt.Image pic)
          Create a buffered image object
BufferedImg(int width, int height, int imageType)
          Create a buffered image object
 
Method Summary
 Colour getVal(int x, int y)
          Gets the colour of the pixel at (x, y) in the image
 int maxX()
           
 int maxY()
           
 Colour sumArea(int x1, int y1, int w, int h)
          Calculate the sum of values in a region conventionally
 
Methods inherited from class java.awt.image.BufferedImage
addTileObserver, coerceData, copyData, createGraphics, getAlphaRaster, getColorModel, getData, getData, getGraphics, getHeight, getHeight, getMinTileX, getMinTileY, getMinX, getMinY, getNumXTiles, getNumYTiles, getProperty, getProperty, getPropertyNames, getRaster, getRGB, getRGB, getSampleModel, getSource, getSources, getSubimage, getTile, getTileGridXOffset, getTileGridYOffset, getTileHeight, getTileWidth, getTransparency, getType, getWidth, getWidth, getWritableTile, getWritableTileIndices, hasTileWriters, isAlphaPremultiplied, isTileWritable, releaseWritableTile, removeTileObserver, setData, setRGB, setRGB, toString
 
Methods inherited from class java.awt.Image
flush, getAccelerationPriority, getCapabilities, getScaledInstance, setAccelerationPriority
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BufferedImg

public BufferedImg(int width,
                   int height,
                   int imageType)
Create a buffered image object

Parameters:
width - The width of the object in pixels
height - The height og the object in pixels
imageType - The type of image

BufferedImg

public BufferedImg(java.awt.image.BufferedImage pic)
Create a buffered image object

Parameters:
pic - The picture to use

BufferedImg

public BufferedImg(java.awt.Image pic)
Create a buffered image object

Parameters:
pic - The picture to use
Method Detail

maxX

public int maxX()
Returns:
The maximum x coordinate of the image

maxY

public int maxY()
Returns:
The maximum y coordinate of the image

getVal

public Colour getVal(int x,
                     int y)
Gets the colour of the pixel at (x, y) in the image

Parameters:
x - The x coordinate of the pixel
y - The y coordinate of the pixel
Returns:
The colour of the pixel

sumArea

public Colour sumArea(int x1,
                      int y1,
                      int w,
                      int h)
Calculate the sum of values in a region conventionally

Parameters:
x1 - The x coordinate of the bottom left corner of the region
y1 - The y coordinate of the bottom left corner of the region
w - The width of the region
h - The height of the region
Returns:
return the sum over the area