Package com.jhlabs.image
Class GlintFilter
- java.lang.Object
-
- com.jhlabs.image.AbstractBufferedImageOp
-
- com.jhlabs.image.GlintFilter
-
- All Implemented Interfaces:
java.awt.image.BufferedImageOp
,java.lang.Cloneable
public class GlintFilter extends AbstractBufferedImageOp
A filter which renders "glints" on bright parts of the image.
-
-
Constructor Summary
Constructors Constructor Description GlintFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.image.BufferedImage
filter(java.awt.image.BufferedImage src, java.awt.image.BufferedImage dst)
float
getAmount()
Get the amount of glint.float
getBlur()
Set the blur that is applied before thresholding.Colormap
getColormap()
Get the colormap to be used for the filter.boolean
getGlintOnly()
Get whether to render the stars and the image or only the stars.int
getLength()
Get the length of the stars.float
getThreshold()
Get the threshold value.void
setAmount(float amount)
Set the amount of glint.void
setBlur(float blur)
Set the blur that is applied before thresholding.void
setColormap(Colormap colormap)
Set the colormap to be used for the filter.void
setGlintOnly(boolean glintOnly)
Set whether to render the stars and the image or only the stars.void
setLength(int length)
Set the length of the stars.void
setThreshold(float threshold)
Set the threshold value.java.lang.String
toString()
-
Methods inherited from class com.jhlabs.image.AbstractBufferedImageOp
clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRenderingHints, getRGB, setRGB, stringToColor
-
-
-
-
Method Detail
-
setThreshold
public void setThreshold(float threshold)
Set the threshold value.- Parameters:
threshold
- the threshold value- See Also:
getThreshold()
-
getThreshold
public float getThreshold()
Get the threshold value.- Returns:
- the threshold value
- See Also:
setThreshold(float)
-
setAmount
public void setAmount(float amount)
Set the amount of glint.- Parameters:
amount
- the amount. min-value: 0, max-value: 1.- See Also:
getAmount()
-
getAmount
public float getAmount()
Get the amount of glint.- Returns:
- the amount
- See Also:
setAmount(float)
-
setLength
public void setLength(int length)
Set the length of the stars.- Parameters:
length
- the length- See Also:
getLength()
-
getLength
public int getLength()
Get the length of the stars.- Returns:
- the length
- See Also:
setLength(int)
-
setBlur
public void setBlur(float blur)
Set the blur that is applied before thresholding.- Parameters:
blur
- the blur radius- See Also:
getBlur()
-
getBlur
public float getBlur()
Set the blur that is applied before thresholding.- Returns:
- the blur radius
- See Also:
setBlur(float)
-
setGlintOnly
public void setGlintOnly(boolean glintOnly)
Set whether to render the stars and the image or only the stars.- Parameters:
glintOnly
- true to render only stars- See Also:
getGlintOnly()
-
getGlintOnly
public boolean getGlintOnly()
Get whether to render the stars and the image or only the stars.- Returns:
- true to render only stars
- See Also:
setGlintOnly(boolean)
-
setColormap
public void setColormap(Colormap colormap)
Set the colormap to be used for the filter.- Parameters:
colormap
- the colormap- See Also:
getColormap()
-
getColormap
public Colormap getColormap()
Get the colormap to be used for the filter.- Returns:
- the colormap
- See Also:
setColormap(com.jhlabs.image.Colormap)
-
filter
public java.awt.image.BufferedImage filter(java.awt.image.BufferedImage src, java.awt.image.BufferedImage dst)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-