类 CellularFilter
- java.lang.Object
-
- org.meteoinfo.image.filter.AbstractBufferedImageOp
-
- org.meteoinfo.image.filter.WholeImageFilter
-
- org.meteoinfo.image.filter.CellularFilter
-
- 所有已实现的接口:
BufferedImageOp,Cloneable,Function2D
- 直接已知子类:
CrystallizeFilter,PointillizeFilter
public class CellularFilter extends WholeImageFilter implements Function2D, Cloneable
A filter which produces an image with a cellular texture.
-
-
嵌套类概要
嵌套类 修饰符和类型 类 说明 classCellularFilter.Point
-
字段概要
字段 修饰符和类型 字段 说明 floatamountprotected floatangleprotected floatangleCoefficientfloatbiasprotected float[]coefficientsprotected ColormapcolormapfloatdistancePowerfloatgainprotected intgridTypestatic intHEXAGONALprotected floatm00protected floatm01protected floatm10protected floatm11static intOCTAGONALprotected Randomrandomstatic intRANDOMprotected floatrandomnessprotected CellularFilter.Point[]resultsprotected floatscalestatic intSQUAREprotected floatstretchstatic intTRIANGULARfloatturbulencebooleanuseColor-
从类继承的字段 org.meteoinfo.image.filter.WholeImageFilter
originalSpace, transformedSpace
-
-
构造器概要
构造器 构造器 说明 CellularFilter()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 Objectclone()floatevaluate(float x, float y)protected int[]filterPixels(int width, int height, int[] inPixels, Rectangle transformedSpace)Actually filter the pixels.floatgetAmount()Get the amount of texture.floatgetAngle()Returns the angle of the texture.floatgetAngleCoefficient()floatgetCoefficient(int i)ColormapgetColormap()Get the colormap to be used for the filter.floatgetDistancePower()floatgetF1()floatgetF2()floatgetF3()floatgetF4()floatgetGradientCoefficient()intgetGridType()intgetPixel(int x, int y, int[] inPixels, int width, int height)floatgetRandomness()floatgetScale()Returns the scale of the texture.floatgetStretch()Returns the stretch factor of the texture.floatgetTurbulence()Returns the turbulence of the effect.voidsetAmount(float amount)Set the amount of effect.voidsetAngle(float angle)Specifies the angle of the texture.voidsetAngleCoefficient(float angleCoefficient)voidsetCoefficient(int i, float v)voidsetColormap(Colormap colormap)Set the colormap to be used for the filter.voidsetDistancePower(float distancePower)voidsetF1(float v)voidsetF2(float v)voidsetF3(float v)voidsetF4(float v)voidsetGradientCoefficient(float gradientCoefficient)voidsetGridType(int gridType)voidsetRandomness(float randomness)voidsetScale(float scale)Specifies the scale of the texture.voidsetStretch(float stretch)Specifies the stretch factor of the texture.voidsetTurbulence(float turbulence)Specifies the turbulence of the texture.StringtoString()floatturbulence2(float x, float y, float freq)-
从类继承的方法 org.meteoinfo.image.filter.WholeImageFilter
filter, transformSpace
-
从类继承的方法 org.meteoinfo.image.filter.AbstractBufferedImageOp
createCompatibleDestImage, getBounds2D, getPoint2D, getRenderingHints, getRGB, setRGB
-
-
-
-
字段详细资料
-
scale
protected float scale
-
stretch
protected float stretch
-
angle
protected float angle
-
amount
public float amount
-
turbulence
public float turbulence
-
gain
public float gain
-
bias
public float bias
-
distancePower
public float distancePower
-
useColor
public boolean useColor
-
colormap
protected Colormap colormap
-
coefficients
protected float[] coefficients
-
angleCoefficient
protected float angleCoefficient
-
random
protected Random random
-
m00
protected float m00
-
m01
protected float m01
-
m10
protected float m10
-
m11
protected float m11
-
results
protected CellularFilter.Point[] results
-
randomness
protected float randomness
-
gridType
protected int gridType
-
RANDOM
public static final int RANDOM
- 另请参阅:
- 常量字段值
-
SQUARE
public static final int SQUARE
- 另请参阅:
- 常量字段值
-
HEXAGONAL
public static final int HEXAGONAL
- 另请参阅:
- 常量字段值
-
OCTAGONAL
public static final int OCTAGONAL
- 另请参阅:
- 常量字段值
-
TRIANGULAR
public static final int TRIANGULAR
- 另请参阅:
- 常量字段值
-
-
方法详细资料
-
setScale
public void setScale(float scale)
Specifies the scale of the texture.- 参数:
scale- the scale of the texture. min-value 1 max-value 300+- 另请参阅:
getScale()
-
getScale
public float getScale()
Returns the scale of the texture.- 返回:
- the scale of the texture.
- 另请参阅:
setScale(float)
-
setStretch
public void setStretch(float stretch)
Specifies the stretch factor of the texture.- 参数:
stretch- the stretch factor of the texture. min-value 1 max-value 50+- 另请参阅:
getStretch()
-
getStretch
public float getStretch()
Returns the stretch factor of the texture.- 返回:
- the stretch factor of the texture.
- 另请参阅:
setStretch(float)
-
setAngle
public void setAngle(float angle)
Specifies the angle of the texture.- 参数:
angle- the angle of the texture.- 另请参阅:
getAngle()
-
getAngle
public float getAngle()
Returns the angle of the texture.- 返回:
- the angle of the texture.
- 另请参阅:
setAngle(float)
-
setCoefficient
public void setCoefficient(int i, float v)
-
getCoefficient
public float getCoefficient(int i)
-
setAngleCoefficient
public void setAngleCoefficient(float angleCoefficient)
-
getAngleCoefficient
public float getAngleCoefficient()
-
setGradientCoefficient
public void setGradientCoefficient(float gradientCoefficient)
-
getGradientCoefficient
public float getGradientCoefficient()
-
setF1
public void setF1(float v)
-
getF1
public float getF1()
-
setF2
public void setF2(float v)
-
getF2
public float getF2()
-
setF3
public void setF3(float v)
-
getF3
public float getF3()
-
setF4
public void setF4(float v)
-
getF4
public float getF4()
-
setColormap
public void setColormap(Colormap colormap)
Set the colormap to be used for the filter.- 参数:
colormap- the colormap- 另请参阅:
getColormap()
-
getColormap
public Colormap getColormap()
Get the colormap to be used for the filter.- 返回:
- the colormap
- 另请参阅:
setColormap(org.meteoinfo.image.filter.Colormap)
-
setRandomness
public void setRandomness(float randomness)
-
getRandomness
public float getRandomness()
-
setGridType
public void setGridType(int gridType)
-
getGridType
public int getGridType()
-
setDistancePower
public void setDistancePower(float distancePower)
-
getDistancePower
public float getDistancePower()
-
setTurbulence
public void setTurbulence(float turbulence)
Specifies the turbulence of the texture.- 参数:
turbulence- the turbulence of the texture. min-value 0 max-value 1- 另请参阅:
getTurbulence()
-
getTurbulence
public float getTurbulence()
Returns the turbulence of the effect.- 返回:
- the turbulence of the effect.
- 另请参阅:
setTurbulence(float)
-
setAmount
public void setAmount(float amount)
Set the amount of effect.- 参数:
amount- the amount min-value 0 max-value 1- 另请参阅:
getAmount()
-
getAmount
public float getAmount()
Get the amount of texture.- 返回:
- the amount
- 另请参阅:
setAmount(float)
-
evaluate
public float evaluate(float x, float y)- 指定者:
evaluate在接口中Function2D
-
turbulence2
public float turbulence2(float x, float y, float freq)
-
getPixel
public int getPixel(int x, int y, int[] inPixels, int width, int height)
-
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
-
clone
public Object clone()
- 覆盖:
clone在类中AbstractBufferedImageOp
-
-