Documentation of 'Catalano.Imaging.Concurrent.Filters.HSLFiltering' Java class
HSLFiltering
Catalano.Imaging.Concurrent.Filters

Class HSLFiltering

  • All Implemented Interfaces:
    IApplyInPlace


    public class HSLFiltering
    extends java.lang.Object
    implements IApplyInPlace
    Color filtering in HSL color space. The filter operates in HSL color space and filters pixels, which color is inside/outside of the specified HSL range - it keeps pixels with colors inside/outside of the specified range and fills the rest with FillColor specified color.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void applyInPlace(FastBitmap fastBitmap)
      Apply filter to an image.
      float[] getFillColor()
      Get fill color used to fill filtered pixels.
      IntRange getHue()
      Get Range of hue component, [0, 359].
      FloatRange getLuminance()
      Get Range of luminance component, [0, 1].
      FloatRange getSaturation()
      Get Range of saturation component, [0, 1].
      boolean isFillOutsideRange()
      Verify if pixels should be filled inside or outside specified color range.
      boolean isUpdatedHue()
      Verify if hue value of filtered pixels should be updated.
      boolean isUpdatedLuminance()
      Verify if luminance value of filtered pixels should be updated.
      boolean isUpdatedSaturation()
      Verify if saturation value of filtered pixels should be updated.
      void setFillColor(int hue, float saturation, float luminance)
      Set fill color used to fill filtered pixels.
      void setFillOutsideRange(boolean fillOutsideRange)
      Determines, if pixels should be filled inside or outside specified.
      void setHue(IntRange hue)
      Set Range of hue component, [0, 359].
      void setLuminance(FloatRange luminance)
      Set Range of luminance component, [0, 1].
      void setSaturation(FloatRange saturation)
      Set Range of saturation component, [0, 1].
      void setUpdateHue(boolean update)
      Determines, if hue value of filtered pixels should be updated.
      void setUpdateLuminance(boolean update)
      Determines, if luminance value of filtered pixels should be updated.
      void setUpdateSaturation(boolean update)
      Determines, if saturation value of filtered pixels should be updated.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HSLFiltering

        public HSLFiltering()
        Initializes a new instance of the HSLFiltering class.
      • HSLFiltering

        public HSLFiltering(IntRange hue,
                            FloatRange saturation,
                            FloatRange luminance)
        Initializes a new instance of the HSLFiltering class.
        Parameters:
        hue - Range of hue component.
        saturation - Range of saturation component.
        luminance - Range of luminance component.
    • Method Detail

      • getHue

        public IntRange getHue()
        Get Range of hue component, [0, 359].
        Returns:
        Hue component.
      • setHue

        public void setHue(IntRange hue)
        Set Range of hue component, [0, 359].
        Parameters:
        hue - Hue component.
      • getSaturation

        public FloatRange getSaturation()
        Get Range of saturation component, [0, 1].
        Returns:
        Saturation component.
      • setSaturation

        public void setSaturation(FloatRange saturation)
        Set Range of saturation component, [0, 1].
        Parameters:
        saturation - Saturation component.
      • getLuminance

        public FloatRange getLuminance()
        Get Range of luminance component, [0, 1].
        Returns:
        Luminance component.
      • setLuminance

        public void setLuminance(FloatRange luminance)
        Set Range of luminance component, [0, 1].
        Parameters:
        luminance - Luminance component.
      • getFillColor

        public float[] getFillColor()
        Get fill color used to fill filtered pixels.
        Returns:
        Hue color.
      • setFillColor

        public void setFillColor(int hue,
                                 float saturation,
                                 float luminance)
        Set fill color used to fill filtered pixels.
        Parameters:
        hue - Hue, [0, 359].
        saturation - Saturation, [0, 1].
        luminance - Luminance, [0, 1].
      • isFillOutsideRange

        public boolean isFillOutsideRange()
        Verify if pixels should be filled inside or outside specified color range.
        Returns:
        True if fill outside the range, otherwise false.
      • setFillOutsideRange

        public void setFillOutsideRange(boolean fillOutsideRange)
        Determines, if pixels should be filled inside or outside specified.
        Parameters:
        fillOutsideRange - True if fill outside the range, otherwise false.
      • isUpdatedHue

        public boolean isUpdatedHue()
        Verify if hue value of filtered pixels should be updated.
        Returns:
        True if should be updated, otherwise false.
      • setUpdateHue

        public void setUpdateHue(boolean update)
        Determines, if hue value of filtered pixels should be updated.
        Parameters:
        update - True if should be updated, otherwise false.
      • isUpdatedSaturation

        public boolean isUpdatedSaturation()
        Verify if saturation value of filtered pixels should be updated.
        Returns:
        True if should be updated, otherwise false.
      • setUpdateSaturation

        public void setUpdateSaturation(boolean update)
        Determines, if saturation value of filtered pixels should be updated.
        Parameters:
        update - True if should be updated, otherwise false.
      • isUpdatedLuminance

        public boolean isUpdatedLuminance()
        Verify if luminance value of filtered pixels should be updated.
        Returns:
        True if should be updated, otherwise false.
      • setUpdateLuminance

        public void setUpdateLuminance(boolean update)
        Determines, if luminance value of filtered pixels should be updated.
        Parameters:
        update - True if should be updated, otherwise false.
      • applyInPlace

        public void applyInPlace(FastBitmap fastBitmap)
        Description copied from interface: IApplyInPlace
        Apply filter to an image.
        Specified by:
        applyInPlace in interface IApplyInPlace
        Parameters:
        fastBitmap - Image to be processed.

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.