|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.image.Raster uk.ac.essex.ia.util.Raster2
public class Raster2
A simple extension of Raster which adds some convenience methods for access pixel values in a more intuitive way (grey(), red(), green(), blue(), etc.) and a set of statistical operations on pixel values.
Field Summary | |
---|---|
static int |
BLACK
|
static int |
WHITE
|
Fields inherited from class java.awt.image.Raster |
---|
dataBuffer, height, minX, minY, numBands, numDataElements, parent, sampleModel, sampleModelTranslateX, sampleModelTranslateY, width |
Constructor Summary | |
---|---|
Raster2(java.awt.image.Raster src)
Effectively type-casts a Raster as a Raster2 by calling parent constructor with the given parameters. |
|
Raster2(java.awt.image.SampleModel sampleModel,
java.awt.image.DataBuffer dataBuffer,
java.awt.Point origin)
constructs a Raster2 by calling parent constructor with the given parameters. |
|
Raster2(java.awt.image.SampleModel sampleModel,
java.awt.image.DataBuffer dataBuffer,
java.awt.Rectangle aRegion,
java.awt.Point sampleModelTranslate,
java.awt.image.Raster parent)
constructs a Raster2 by calling parent constructor with the given parameters. |
|
Raster2(java.awt.image.SampleModel sampleModel,
java.awt.Point origin)
constructs a Raster2 by calling parent constructor with the given parameters. |
Method Summary | |
---|---|
int |
blue(int u,
int v)
returns the blue pixel value in band 2 at the given position. |
double |
blueCovariance()
returns the covariance of the blue pixels in band 2. |
double |
blueGreenCrossCovariance()
returns the covariance between the pixel values in bands 1 and 2 (blue, green). |
double |
blueMean()
returns the mean blue pixel value in band 2. |
int |
eastNeighbor(int u,
int v)
returns the pixel value in band 0 at position east of the given position, if it exists, otherwise returns -1. |
int |
green(int u,
int v)
returns the green pixel value in band 1 at the given position. |
double |
greenCovariance()
returns the covariance of the green pixels in band 1. |
double |
greenMean()
returns the mean green pixel value in band 1. |
int |
grey(int u,
int v)
returns the pixel value in band 0 at the given position. |
double |
greyCovariance()
returns the covariance of the pixels in band 0. |
double |
greyMean()
returns the mean pixel value in band 0. |
int |
maxBlue()
returns the maximum blue pixel value in band 2. |
int |
maxGreen()
returns the maximum green pixel value in band 1. |
int |
maxGrey()
returns the maximum pixel value in band 0 |
int |
maxRed()
returns the maximum red pixel value in band 0. |
int |
minBlue()
returns the minimum blue pixel value in band 2. |
int |
minGreen()
returns the minimum green pixel value in band 1. |
int |
minGrey()
returns the minimum pixel value in band 0. |
int |
minRed()
returns the minimum red pixel value in band 0. |
int |
northNeighbor(int u,
int v)
returns the pixel value in band 0 at position north of the given position, if it exists, otherwise returns -1. |
int |
red(int u,
int v)
returns the red pixel value in band 0 at the given position. |
double |
redBlueCrossCovariance()
returns the covariance between the pixel values in bands 0 and 2 (red, blue). |
double |
redCovariance()
returns the covariance of the red pixels in band 0. |
double |
redGreenCrossCovariance()
returns the covariance between the pixel values in bands 0 and 1 (red, green). |
double |
redMean()
returns the mean red pixel value in band 0. |
int |
southNeighbor(int u,
int v)
returns the pixel value in band 0 at position south of the given position, if it exists, otherwise returns -1. |
int |
westNeighbor(int u,
int v)
returns the pixel value in band 0 at position west of the given position, if it exists, otherwise returns -1. |
Methods inherited from class java.awt.image.Raster |
---|
createBandedRaster, createBandedRaster, createBandedRaster, createChild, createCompatibleWritableRaster, createCompatibleWritableRaster, createCompatibleWritableRaster, createCompatibleWritableRaster, createInterleavedRaster, createInterleavedRaster, createInterleavedRaster, createPackedRaster, createPackedRaster, createPackedRaster, createPackedRaster, createRaster, createTranslatedChild, createWritableRaster, createWritableRaster, getBounds, getDataBuffer, getDataElements, getDataElements, getHeight, getMinX, getMinY, getNumBands, getNumDataElements, getParent, getPixel, getPixel, getPixel, getPixels, getPixels, getPixels, getSample, getSampleDouble, getSampleFloat, getSampleModel, getSampleModelTranslateX, getSampleModelTranslateY, getSamples, getSamples, getSamples, getTransferType, getWidth |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int BLACK
public static final int WHITE
Constructor Detail |
---|
public Raster2(java.awt.image.SampleModel sampleModel, java.awt.image.DataBuffer dataBuffer, java.awt.Point origin)
public Raster2(java.awt.image.SampleModel sampleModel, java.awt.image.DataBuffer dataBuffer, java.awt.Rectangle aRegion, java.awt.Point sampleModelTranslate, java.awt.image.Raster parent)
public Raster2(java.awt.image.SampleModel sampleModel, java.awt.Point origin)
public Raster2(java.awt.image.Raster src)
src
- the Raster to castMethod Detail |
---|
public int grey(int u, int v)
u
- horizontal raster position.v
- vertical raster position.
public int westNeighbor(int u, int v)
u
- horizontal raster position.v
- vertical raster position.
public int eastNeighbor(int u, int v)
u
- horizontal raster position.v
- vertical raster position.
public int northNeighbor(int u, int v)
u
- horizontal raster position.v
- vertical raster position.
public int southNeighbor(int u, int v)
u
- horizontal raster position.v
- vertical raster position.
public int blue(int u, int v)
u
- horizontal raster position.v
- vertical raster position.
public int green(int u, int v)
u
- horizontal raster position.v
- vertical raster position.
public int red(int u, int v)
u
- horizontal raster position.v
- vertical raster position.
public int minGrey()
public int minRed()
public int minGreen()
public int minBlue()
public int maxGrey()
public int maxRed()
public int maxGreen()
public int maxBlue()
public double redMean()
public double redCovariance()
public double greenMean()
public double greenCovariance()
public double blueMean()
public double blueCovariance()
public double greyMean()
public double greyCovariance()
public double redGreenCrossCovariance()
public double blueGreenCrossCovariance()
public double redBlueCrossCovariance()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |