| java.lang.Object javax.media.jai.PlanarImage javax.media.jai.OpImage javax.media.jai.PointOpImage javax.media.jai.ColormapOpImage
All known Subclasses: com.sun.media.jai.opimage.RescaleOpImage, com.sun.media.jai.opimage.PiecewiseOpImage, com.sun.media.jai.opimage.DivideIntoConstOpImage, ca.forklabs.media.jai.opimage.UnaryFunctionOpImage, com.sun.media.jai.opimage.ExpOpImage, com.sun.media.jai.opimage.AddConstOpImage, com.sun.media.jai.opimage.LookupOpImage, com.sun.media.jai.opimage.AndConstOpImage, com.sun.media.jai.opimage.OrConstOpImage, com.sun.media.jai.opimage.LogOpImage, com.sun.media.jai.opimage.ThresholdOpImage, com.sun.media.jai.opimage.XorConstOpImage, com.sun.media.jai.opimage.InvertOpImage, com.sun.media.jai.opimage.NotOpImage, com.sun.media.jai.opimage.SubtractFromConstOpImage, com.sun.media.jai.opimage.MultiplyConstOpImage,
ColormapOpImage | abstract public class ColormapOpImage extends PointOpImage (Code) | | A class to be used to implement an operation which may conditionally
be accelerated by transforming the colormap of the source image instead
of its data. An instance of this class will represent the destination
of a single-source point operation which may be effected by a simple
transformation of the source image colormap if the ColorModel s
of the source and destination images are both instances of
IndexColorModel . A subclass may take advantage of this
capability merely by implementing transformColormap() and
invoking initializeColormapOperation() as the last
statement of its constructor. If the ColorModel s are not
IndexColorModel s, the behavior is the same as if the
superclass PointOpImage had been extended directly.
The default behavior for a ColormapOpImage is to
do the transform only on the color map in order to accelerate processing
when the source and destination images are all color-indexed.
However, in some situations it may be desirable to transform the
pixel (index) data directly instead of transforming the colormap.
To suppress the acceleration, a mapping of the key
JAI.KEY_TRANSFORM_ON_COLORMAP with value
Boolean.FALSE should be added to the configuration
map (or the RenderingHints provided to the
create methods in the class JAI ) supplied to
the corresponding operation when it is created.
Transforming on the pixel (index) data is only meaningful
when the transform maps all the possible index values of the source image
into the index value set of the destination image. Otherwise,
it may generate pixel (index) values without color definitions, and
cause problems when computing the color components from pixel values.
In addition, the colormaps should be ordered in a useful way
for the transform in question, e.g. a smooth grayscale.
See Also: java.awt.image.IndexColorModel See Also: PointOpImage since: JAI 1.1 |
Constructor Summary | |
public | ColormapOpImage(RenderedImage source, ImageLayout layout, Map configuration, boolean cobbleSources) Constructs a ColormapOpImage with one source image. |
Method Summary | |
final protected void | initializeColormapOperation() Method to be invoked as the last statement of a subclass constructor.
The colormap acceleration flag is set appropriately and if
true a new ColorModel is calculated by
transforming the source colormap. | final protected boolean | isColormapOperation() Whether the operation is performed on the colormap directly. | abstract protected void | transformColormap(byte[][] colormap) Transform the colormap according to the specific operation.
The modification is done in place so that the parameter array
will be modified. |
ColormapOpImage | public ColormapOpImage(RenderedImage source, ImageLayout layout, Map configuration, boolean cobbleSources)(Code) | | Constructs a ColormapOpImage with one source image.
The parameters are forwarded unmodified to the equivalent
superclass constructor.
Parameters: layout - The layout parameters of the destination image. Parameters: source - The source image. Parameters: configuration - Configurable attributes of the image includingconfiguration variables indexed byRenderingHints.Key s and image properties indexedby String s or CaselessStringKey s.This is simply forwarded to the superclass constructor. Parameters: cobbleSources - Indicates whether computeRect() expects contiguous sources. throws: IllegalArgumentException - if source is null . |
initializeColormapOperation | final protected void initializeColormapOperation()(Code) | | Method to be invoked as the last statement of a subclass constructor.
The colormap acceleration flag is set appropriately and if
true a new ColorModel is calculated by
transforming the source colormap. This method must be invoked in
the subclass constructor as it calls transformColormap()
which is abstract and therefore requires that the implementing class be
constructed before it may be invoked.
|
isColormapOperation | final protected boolean isColormapOperation()(Code) | | Whether the operation is performed on the colormap directly.
|
transformColormap | abstract protected void transformColormap(byte[][] colormap)(Code) | | Transform the colormap according to the specific operation.
The modification is done in place so that the parameter array
will be modified. The format of the parameter array is
byte[3][] wherein colormap[0] ,
colormap[1] , and colormap[2]
represent the red, green, and blue colormaps, respectively.
|
Methods inherited from javax.media.jai.OpImage | protected void addTileToCache(int tileX, int tileY, Raster tile)(Code)(Java Doc) public void cancelTiles(TileRequest request, Point[] tileIndices)(Code)(Java Doc) static Vector checkSourceVector(Vector sources, boolean checkElements)(Code)(Java Doc) protected void computeRect(Raster[] sources, WritableRaster dest, Rectangle destRect)(Code)(Java Doc) protected void computeRect(PlanarImage[] sources, WritableRaster dest, Rectangle destRect)(Code)(Java Doc) public Raster computeTile(int tileX, int tileY)(Code)(Java Doc) public boolean computesUniqueTiles()(Code)(Java Doc) final protected WritableRaster createTile(int tileX, int tileY)(Code)(Java Doc) public synchronized void dispose()(Code)(Java Doc) public static int getExpandedNumBands(SampleModel sampleModel, ColorModel colorModel)(Code)(Java Doc) protected synchronized RasterFormatTag[] getFormatTags()(Code)(Java Doc) public int getOperationComputeType()(Code)(Java Doc) public Raster getTile(int tileX, int tileY)(Code)(Java Doc) public TileCache getTileCache()(Code)(Java Doc) public Object getTileCacheMetric()(Code)(Java Doc) public Point[] getTileDependencies(int tileX, int tileY, int sourceIndex)(Code)(Java Doc) protected Raster getTileFromCache(int tileX, int tileY)(Code)(Java Doc) public TileRecycler getTileRecycler()(Code)(Java Doc) public Raster[] getTiles(Point[] tileIndices)(Code)(Java Doc) public boolean hasExtender(int sourceIndex)(Code)(Java Doc) public Point2D mapDestPoint(Point2D destPt, int sourceIndex)(Code)(Java Doc) abstract public Rectangle mapDestRect(Rectangle destRect, int sourceIndex)(Code)(Java Doc) public Point2D mapSourcePoint(Point2D sourcePt, int sourceIndex)(Code)(Java Doc) abstract public Rectangle mapSourceRect(Rectangle sourceRect, int sourceIndex)(Code)(Java Doc) public void prefetchTiles(Point[] tileIndices)(Code)(Java Doc) public TileRequest queueTiles(Point[] tileIndices)(Code)(Java Doc) protected void recycleTile(Raster tile)(Code)(Java Doc) public void setTileCache(TileCache cache)(Code)(Java Doc) protected static Vector vectorize(RenderedImage image)(Code)(Java Doc) protected static Vector vectorize(RenderedImage image1, RenderedImage image2)(Code)(Java Doc) protected static Vector vectorize(RenderedImage image1, RenderedImage image2, RenderedImage image3)(Code)(Java Doc)
|
Methods inherited from javax.media.jai.PlanarImage | public static int XToTileX(int x, int tileGridXOffset, int tileWidth)(Code)(Java Doc) public int XToTileX(int x)(Code)(Java Doc) public static int YToTileY(int y, int tileGridYOffset, int tileHeight)(Code)(Java Doc) public int YToTileY(int y)(Code)(Java Doc) public void addPropertyChangeListener(PropertyChangeListener listener)(Code)(Java Doc) public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)(Code)(Java Doc) public synchronized boolean addSink(Object sink)(Code)(Java Doc) protected void addSink(PlanarImage sink)(Code)(Java Doc) protected void addSource(Object source)(Code)(Java Doc) public synchronized void addTileComputationListener(TileComputationListener listener)(Code)(Java Doc) public void cancelTiles(TileRequest request, Point[] tileIndices)(Code)(Java Doc) public WritableRaster copyData()(Code)(Java Doc) public WritableRaster copyData(WritableRaster raster)(Code)(Java Doc) public void copyExtendedData(WritableRaster dest, BorderExtender extender)(Code)(Java Doc) public static ColorModel createColorModel(SampleModel sm)(Code)(Java Doc) public PlanarImage createSnapshot()(Code)(Java Doc) final protected WritableRaster createWritableRaster(SampleModel sampleModel, Point location)(Code)(Java Doc) public synchronized void dispose()(Code)(Java Doc) protected void finalize() throws Throwable(Code)(Java Doc) public BufferedImage getAsBufferedImage(Rectangle rect, ColorModel cm)(Code)(Java Doc) public BufferedImage getAsBufferedImage()(Code)(Java Doc) public Rectangle getBounds()(Code)(Java Doc) public ColorModel getColorModel()(Code)(Java Doc) public Raster getData()(Code)(Java Doc) public Raster getData(Rectangle region)(Code)(Java Doc) public static ColorModel getDefaultColorModel(int dataType, int numBands)(Code)(Java Doc) public Raster getExtendedData(Rectangle region, BorderExtender extender)(Code)(Java Doc) public Graphics getGraphics()(Code)(Java Doc) public int getHeight()(Code)(Java Doc) public Object getImageID()(Code)(Java Doc) public int getMaxTileX()(Code)(Java Doc) public int getMaxTileY()(Code)(Java Doc) public int getMaxX()(Code)(Java Doc) public int getMaxY()(Code)(Java Doc) public int getMinTileX()(Code)(Java Doc) public int getMinTileY()(Code)(Java Doc) public int getMinX()(Code)(Java Doc) public int getMinY()(Code)(Java Doc) public int getNumBands()(Code)(Java Doc) public int getNumSources()(Code)(Java Doc) public int getNumXTiles()(Code)(Java Doc) public int getNumYTiles()(Code)(Java Doc) protected Hashtable getProperties()(Code)(Java Doc) public Object getProperty(String name)(Code)(Java Doc) public Class getPropertyClass(String name)(Code)(Java Doc) public String[] getPropertyNames()(Code)(Java Doc) public String[] getPropertyNames(String prefix)(Code)(Java Doc) public SampleModel getSampleModel()(Code)(Java Doc) public Vector getSinks()(Code)(Java Doc) public PlanarImage getSource(int index)(Code)(Java Doc) public PlanarImage getSourceImage(int index)(Code)(Java Doc) public Object getSourceObject(int index)(Code)(Java Doc) public Vector getSources()(Code)(Java Doc) public void getSplits(IntegerSequence xSplits, IntegerSequence ySplits, Rectangle rect)(Code)(Java Doc) abstract public Raster getTile(int tileX, int tileY)(Code)(Java Doc) public TileComputationListener[] getTileComputationListeners()(Code)(Java Doc) public TileFactory getTileFactory()(Code)(Java Doc) public int getTileGridXOffset()(Code)(Java Doc) public int getTileGridYOffset()(Code)(Java Doc) public int getTileHeight()(Code)(Java Doc) public Point[] getTileIndices(Rectangle region)(Code)(Java Doc) public Rectangle getTileRect(int tileX, int tileY)(Code)(Java Doc) public int getTileWidth()(Code)(Java Doc) public Raster[] getTiles(Point[] tileIndices)(Code)(Java Doc) public Raster[] getTiles()(Code)(Java Doc) public int getWidth()(Code)(Java Doc) public boolean overlapsMultipleTiles(Rectangle rect)(Code)(Java Doc) public void prefetchTiles(Point[] tileIndices)(Code)(Java Doc) public TileRequest queueTiles(Point[] tileIndices)(Code)(Java Doc) public void removeProperty(String name)(Code)(Java Doc) public void removePropertyChangeListener(PropertyChangeListener listener)(Code)(Java Doc) public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)(Code)(Java Doc) public synchronized boolean removeSink(Object sink)(Code)(Java Doc) protected boolean removeSink(PlanarImage sink)(Code)(Java Doc) public void removeSinks()(Code)(Java Doc) protected boolean removeSource(Object source)(Code)(Java Doc) protected void removeSources()(Code)(Java Doc) public synchronized void removeTileComputationListener(TileComputationListener listener)(Code)(Java Doc) protected void setImageLayout(ImageLayout layout)(Code)(Java Doc) protected void setProperties(Hashtable properties)(Code)(Java Doc) public void setProperty(String name, Object value)(Code)(Java Doc) protected void setSource(Object source, int index)(Code)(Java Doc) protected void setSources(List sourceList)(Code)(Java Doc) public static int tileXToX(int tx, int tileGridXOffset, int tileWidth)(Code)(Java Doc) public int tileXToX(int tx)(Code)(Java Doc) public static int tileYToY(int ty, int tileGridYOffset, int tileHeight)(Code)(Java Doc) public int tileYToY(int ty)(Code)(Java Doc) public String toString()(Code)(Java Doc) public static PlanarImage wrapRenderedImage(RenderedImage image)(Code)(Java Doc)
|
|
|