类 DiffusionFilter
- java.lang.Object
-
- org.meteoinfo.image.filter.AbstractBufferedImageOp
-
- org.meteoinfo.image.filter.WholeImageFilter
-
- org.meteoinfo.image.filter.DiffusionFilter
-
- 所有已实现的接口:
BufferedImageOp,Cloneable
public class DiffusionFilter extends WholeImageFilter
A filter which uses Floyd-Steinberg error diffusion dithering to halftone an image.
-
-
字段概要
-
从类继承的字段 org.meteoinfo.image.filter.WholeImageFilter
originalSpace, transformedSpace
-
-
构造器概要
构造器 构造器 说明 DiffusionFilter()Construct a DiffusionFilter.
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected int[]filterPixels(int width, int height, int[] inPixels, Rectangle transformedSpace)Actually filter the pixels.booleangetColorDither()Get whether to use a color dither.intgetLevels()Get the number of dither levels.int[]getMatrix()Get the dither matrix.booleangetSerpentine()Return the serpentine setting.voidsetColorDither(boolean colorDither)Set whether to use a color dither.voidsetLevels(int levels)Set the number of dither levels.voidsetMatrix(int[] matrix)Set the dither matrix.voidsetSerpentine(boolean serpentine)Set whether to use a serpentine pattern for return or not.StringtoString()-
从类继承的方法 org.meteoinfo.image.filter.WholeImageFilter
filter, transformSpace
-
从类继承的方法 org.meteoinfo.image.filter.AbstractBufferedImageOp
clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRenderingHints, getRGB, setRGB
-
-
-
-
方法详细资料
-
setSerpentine
public void setSerpentine(boolean serpentine)
Set whether to use a serpentine pattern for return or not. This can reduce 'avalanche' artifacts in the output.- 参数:
serpentine- true to use serpentine pattern- 另请参阅:
getSerpentine()
-
getSerpentine
public boolean getSerpentine()
Return the serpentine setting.- 返回:
- the current setting
- 另请参阅:
setSerpentine(boolean)
-
setColorDither
public void setColorDither(boolean colorDither)
Set whether to use a color dither.- 参数:
colorDither- true to use a color dither- 另请参阅:
getColorDither()
-
getColorDither
public boolean getColorDither()
Get whether to use a color dither.- 返回:
- true to use a color dither
- 另请参阅:
setColorDither(boolean)
-
setMatrix
public void setMatrix(int[] matrix)
Set the dither matrix.- 参数:
matrix- the dither matrix- 另请参阅:
getMatrix()
-
getMatrix
public int[] getMatrix()
Get the dither matrix.- 返回:
- the dither matrix
- 另请参阅:
setMatrix(int[])
-
setLevels
public void setLevels(int levels)
Set the number of dither levels.- 参数:
levels- the number of levels- 另请参阅:
getLevels()
-
getLevels
public int getLevels()
Get the number of dither levels.- 返回:
- the number of levels
- 另请参阅:
setLevels(int)
-
filterPixels
protected int[] filterPixels(int width, int height, int[] inPixels, Rectangle transformedSpace)从类复制的说明:WholeImageFilterActually filter the pixels.- 指定者:
filterPixels在类中WholeImageFilter- 参数:
width- the image widthheight- the image heightinPixels- the image pixelstransformedSpace- the output bounds- 返回:
- the output pixels
-
-