| javax.media.jai.OpImage javax.media.jai.PointOpImage com.sun.media.jai.opimage.ColorQuantizerOpImage
All known Subclasses: com.sun.media.jai.opimage.OctTreeOpImage, com.sun.media.jai.opimage.NeuQuantOpImage, com.sun.media.jai.opimage.MedianCutOpImage,
ColorQuantizerOpImage | abstract class ColorQuantizerOpImage extends PointOpImage (Code) | | An OpImage implementing the color quantization operation as
described in javax.media.jai.operator.ColorQuantizerDescriptor .
This OpImage generates an optimal lookup table from the
source RGB image. This lookup table can also be used as a parameter of
operators such as "errordiffusion" to convert the source image into
a color-indexed image.
This OpImage contains the pixels of the result images
from the nearest distance classification based on the lookup table
generated from this OpImage .
See Also: javax.media.jai.KernelJAI See Also: javax.media.jai.LookupTableJAI |
Field Summary | |
protected boolean | checkForSkippedTiles Whether to check for skipped tiles. | protected LookupTableJAI | colorMap The color map which maps the ErrorDiffusionOpImage to
its source. | protected PixelAccessor | destPA Cache the PixelAccessor for computation. | protected boolean | isInitialized | protected int | maxColorNum The expected maximum number of color, that is, the expected size of
the lookup table. | protected ROI | roi The ROI used to define the data set for training. | protected PixelAccessor | srcPA Cache the PixelAccessor for computation. | protected int | srcSampleType Cache the source type. | protected int | xPeriod The subsample rate in the x direction. | protected int | yPeriod The subsample rate in y direction. |
Constructor Summary | |
public | ColorQuantizerOpImage(RenderedImage source, Map config, ImageLayout layout, int maxColorNum, ROI roi, int xPeriod, int yPeriod) Constructs a ColorQuantizerOpImage object.
The image dimensions are derived from the source image. |
checkForSkippedTiles | protected boolean checkForSkippedTiles(Code) | | Whether to check for skipped tiles.
|
colorMap | protected LookupTableJAI colorMap(Code) | | The color map which maps the ErrorDiffusionOpImage to
its source.
|
isInitialized | protected boolean isInitialized(Code) | | |
maxColorNum | protected int maxColorNum(Code) | | The expected maximum number of color, that is, the expected size of
the lookup table.
|
roi | protected ROI roi(Code) | | The ROI used to define the data set for training.
|
srcSampleType | protected int srcSampleType(Code) | | Cache the source type.
|
xPeriod | protected int xPeriod(Code) | | The subsample rate in the x direction.
|
yPeriod | protected int yPeriod(Code) | | The subsample rate in y direction.
|
ColorQuantizerOpImage | public ColorQuantizerOpImage(RenderedImage source, Map config, ImageLayout layout, int maxColorNum, ROI roi, int xPeriod, int yPeriod)(Code) | | Constructs a ColorQuantizerOpImage object.
The image dimensions are derived from the source image. The tile
grid layout, SampleModel, and ColorModel may optionally be specified
by an ImageLayout object.
Parameters: source - A RenderedImage. Parameters: config - The rendering hints. Parameters: layout - An ImageLayout optionally containing the tile grid layout,SampleModel, and ColorModel, or null. Parameters: maxColorNum - The expected maximum number of colors. |
computeRect | protected void computeRect(Raster[] sources, WritableRaster dest, Rectangle destRect)(Code) | | |
findNearestEntry | protected byte findNearestEntry(int r, int g, int b)(Code) | | |
getProperty | public Object getProperty(String name)(Code) | | Returns one of the available statistics as a property.
|
startPosition | final static int startPosition(int pos, int start, int period)(Code) | | Used by the subclasses to define the start pixel position.
|
train | abstract protected void train()(Code) | | |
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) 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)
|
|
|