Class 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 Detail

      • GlintFilter

        public GlintFilter()
    • 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()
      • 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 class java.lang.Object