类 BoxBlurFilter
- java.lang.Object
-
- org.meteoinfo.image.filter.AbstractBufferedImageOp
-
- org.meteoinfo.image.filter.BoxBlurFilter
-
- 所有已实现的接口:
java.awt.image.BufferedImageOp,java.lang.Cloneable
public class BoxBlurFilter extends AbstractBufferedImageOp
A filter which performs a box blur on an image. The horizontal and vertical blurs can be specified separately and a number of iterations can be given which allows an approximation to Gaussian blur.
-
-
构造器概要
构造器 构造器 说明 BoxBlurFilter()Construct a default BoxBlurFilter.BoxBlurFilter(float hRadius, float vRadius, int iterations)Construct a BoxBlurFilter.
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 static voidblur(int[] in, int[] out, int width, int height, float radius)Blur and transpose a block of ARGB pixels.static voidblurFractional(int[] in, int[] out, int width, int height, float radius)java.awt.image.BufferedImagefilter(java.awt.image.BufferedImage src, java.awt.image.BufferedImage dst)floatgetHRadius()Get the horizontal size of the blur.intgetIterations()Get the number of iterations the blur is performed.booleangetPremultiplyAlpha()Get whether to premultiply the alpha channel.floatgetRadius()Get the size of the blur.floatgetVRadius()Get the vertical size of the blur.voidsetHRadius(float hRadius)Set the horizontal size of the blur.voidsetIterations(int iterations)Set the number of iterations the blur is performed.voidsetPremultiplyAlpha(boolean premultiplyAlpha)Set whether to premultiply the alpha channel.voidsetRadius(float radius)Set both the horizontal and vertical sizes of the blur.voidsetVRadius(float vRadius)Set the vertical size of the blur.java.lang.StringtoString()-
从类继承的方法 org.meteoinfo.image.filter.AbstractBufferedImageOp
clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRenderingHints, getRGB, setRGB
-
-
-
-
构造器详细资料
-
BoxBlurFilter
public BoxBlurFilter()
Construct a default BoxBlurFilter.
-
BoxBlurFilter
public BoxBlurFilter(float hRadius, float vRadius, int iterations)Construct a BoxBlurFilter.- 参数:
hRadius- the horizontal radius of blurvRadius- the vertical radius of bluriterations- the number of time to iterate the blur
-
-
方法详细资料
-
setPremultiplyAlpha
public void setPremultiplyAlpha(boolean premultiplyAlpha)
Set whether to premultiply the alpha channel.- 参数:
premultiplyAlpha- true to premultiply the alpha- 另请参阅:
getPremultiplyAlpha()
-
getPremultiplyAlpha
public boolean getPremultiplyAlpha()
Get whether to premultiply the alpha channel.- 返回:
- true to premultiply the alpha
- 另请参阅:
setPremultiplyAlpha(boolean)
-
filter
public java.awt.image.BufferedImage filter(java.awt.image.BufferedImage src, java.awt.image.BufferedImage dst)
-
blur
public static void blur(int[] in, int[] out, int width, int height, float radius)Blur and transpose a block of ARGB pixels.- 参数:
in- the input pixelsout- the output pixelswidth- the width of the pixel arrayheight- the height of the pixel arrayradius- the radius of blur
-
blurFractional
public static void blurFractional(int[] in, int[] out, int width, int height, float radius)
-
setHRadius
public void setHRadius(float hRadius)
Set the horizontal size of the blur.- 参数:
hRadius- the radius of the blur in the horizontal direction- 另请参阅:
getHRadius()
-
getHRadius
public float getHRadius()
Get the horizontal size of the blur.- 返回:
- the radius of the blur in the horizontal direction
- 另请参阅:
setHRadius(float)
-
setVRadius
public void setVRadius(float vRadius)
Set the vertical size of the blur.- 参数:
vRadius- the radius of the blur in the vertical direction- 另请参阅:
getVRadius()
-
getVRadius
public float getVRadius()
Get the vertical size of the blur.- 返回:
- the radius of the blur in the vertical direction
- 另请参阅:
setVRadius(float)
-
setRadius
public void setRadius(float radius)
Set both the horizontal and vertical sizes of the blur.- 参数:
radius- the radius of the blur in both directions- 另请参阅:
getRadius()
-
getRadius
public float getRadius()
Get the size of the blur.- 返回:
- the radius of the blur in the horizontal direction
- 另请参阅:
setRadius(float)
-
setIterations
public void setIterations(int iterations)
Set the number of iterations the blur is performed.- 参数:
iterations- the number of iterations- 另请参阅:
getIterations()
-
getIterations
public int getIterations()
Get the number of iterations the blur is performed.- 返回:
- the number of iterations
- 另请参阅:
setIterations(int)
-
toString
public java.lang.String toString()
- 覆盖:
toString在类中java.lang.Object
-
-