org.jscience.media.pictures.filters
Class WholeImageFilter

java.lang.Object
  extended by java.awt.image.ImageFilter
      extended by org.jscience.media.pictures.filters.WholeImageFilter
All Implemented Interfaces:
java.awt.image.ImageConsumer, java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
BinaryFilter, CausticsFilter, CellularFilter, ConvolveFilter, CraterFilter, DiffusionFilter, DistanceFilter, EdgeFilter, EmbossFilter, LightFilter, MaximumFilter, MedianFilter, MinimumFilter, MotionBlurFilter, OilFilter, PlasmaFilter, QuantizeFilter, QuiltFilter, ShadowFilter, ShapeFilter, TransformFilter, WarpFilter, WaterFilter

public abstract class WholeImageFilter
extends java.awt.image.ImageFilter
implements java.io.Serializable

A filter which acts as a superclass for filters which need to have the whole image in memory to do their stuff.

See Also:
Serialized Form

Field Summary
protected  boolean canFilterIndexColorModel
          If true, then image pixels for images with an IndexColorModel ndex will be accumulated as bytes in inBytePixels.
protected  java.awt.image.ColorModel defaultRGBModel
          DOCUMENT ME!
protected  byte[] inBytePixels
          DOCUMENT ME!
protected  int[] inPixels
          DOCUMENT ME!
protected  java.awt.Rectangle originalSpace
          DOCUMENT ME!
protected  java.awt.Rectangle transformedSpace
          DOCUMENT ME!
 
Fields inherited from class java.awt.image.ImageFilter
consumer
 
Fields inherited from interface java.awt.image.ImageConsumer
COMPLETESCANLINES, IMAGEABORTED, IMAGEERROR, RANDOMPIXELORDER, SINGLEFRAME, SINGLEFRAMEDONE, SINGLEPASS, STATICIMAGEDONE, TOPDOWNLEFTRIGHT
 
Constructor Summary
WholeImageFilter()
          Construct a WholeImageFilter
 
Method Summary
 void setColorModel(java.awt.image.ColorModel model)
          DOCUMENT ME!
 void setDimensions(int width, int height)
          DOCUMENT ME!
 void setPixels(int x, int y, int w, int h, java.awt.image.ColorModel model, byte[] pixels, int off, int scansize)
          DOCUMENT ME!
 void setPixels(int x, int y, int w, int h, java.awt.image.ColorModel model, int[] pixels, int off, int scansize)
          DOCUMENT ME!
protected  void transformSpace(java.awt.Rectangle rect)
          DOCUMENT ME!
 
Methods inherited from class java.awt.image.ImageFilter
clone, getFilterInstance, imageComplete, resendTopDownLeftRight, setHints, setProperties
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

transformedSpace

protected java.awt.Rectangle transformedSpace
DOCUMENT ME!


originalSpace

protected java.awt.Rectangle originalSpace
DOCUMENT ME!


defaultRGBModel

protected java.awt.image.ColorModel defaultRGBModel
DOCUMENT ME!


inPixels

protected int[] inPixels
DOCUMENT ME!


inBytePixels

protected byte[] inBytePixels
DOCUMENT ME!


canFilterIndexColorModel

protected boolean canFilterIndexColorModel
If true, then image pixels for images with an IndexColorModel ndex will be accumulated as bytes in inBytePixels. If false, they will be converted to the default RGB color model and accumulated in inPixels.

Constructor Detail

WholeImageFilter

public WholeImageFilter()
Construct a WholeImageFilter

Method Detail

transformSpace

protected void transformSpace(java.awt.Rectangle rect)
DOCUMENT ME!

Parameters:
rect - DOCUMENT ME!

setDimensions

public void setDimensions(int width,
                          int height)
DOCUMENT ME!

Specified by:
setDimensions in interface java.awt.image.ImageConsumer
Overrides:
setDimensions in class java.awt.image.ImageFilter
Parameters:
width - DOCUMENT ME!
height - DOCUMENT ME!

setColorModel

public void setColorModel(java.awt.image.ColorModel model)
DOCUMENT ME!

Specified by:
setColorModel in interface java.awt.image.ImageConsumer
Overrides:
setColorModel in class java.awt.image.ImageFilter
Parameters:
model - DOCUMENT ME!

setPixels

public void setPixels(int x,
                      int y,
                      int w,
                      int h,
                      java.awt.image.ColorModel model,
                      byte[] pixels,
                      int off,
                      int scansize)
DOCUMENT ME!

Specified by:
setPixels in interface java.awt.image.ImageConsumer
Overrides:
setPixels in class java.awt.image.ImageFilter
Parameters:
x - DOCUMENT ME!
y - DOCUMENT ME!
w - DOCUMENT ME!
h - DOCUMENT ME!
model - DOCUMENT ME!
pixels - DOCUMENT ME!
off - DOCUMENT ME!
scansize - DOCUMENT ME!

setPixels

public void setPixels(int x,
                      int y,
                      int w,
                      int h,
                      java.awt.image.ColorModel model,
                      int[] pixels,
                      int off,
                      int scansize)
DOCUMENT ME!

Specified by:
setPixels in interface java.awt.image.ImageConsumer
Overrides:
setPixels in class java.awt.image.ImageFilter
Parameters:
x - DOCUMENT ME!
y - DOCUMENT ME!
w - DOCUMENT ME!
h - DOCUMENT ME!
model - DOCUMENT ME!
pixels - DOCUMENT ME!
off - DOCUMENT ME!
scansize - DOCUMENT ME!