Class KeepOnlyColors

  • All Implemented Interfaces:
    Destroyable, GlobalInfoSupporter, LoggingLevelHandler, LoggingSupporter, OptionHandler, SizeOfHandler, Serializable

    public class KeepOnlyColors
    extends AbstractImageFilterProvider
    Keeps only the specified colors and turns all other pixels to transparent.

    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
     
    -color <adams.core.base.BaseColor> [-color ...] (property: colors)
        The colors to keep.
        default: 
     
    -replacement <java.awt.Color> (property: replacement)
        The color to replace the unwanted colors with.
        default: #ffffff
     
    Version:
    $Revision$
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_Colors

        protected BaseColor[] m_Colors
        the colors to keep.
      • m_Replacement

        protected Color m_Replacement
        the replacement color.
    • Constructor Detail

      • KeepOnlyColors

        public KeepOnlyColors()
    • Method Detail

      • setColors

        public void setColors​(BaseColor[] value)
        Sets the colors to keep.
        Parameters:
        value - the colors
      • getColors

        public BaseColor[] getColors()
        Returns the colors to keep.
        Returns:
        the colors
      • colorsTipText

        public String colorsTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the gui
      • setReplacement

        public void setReplacement​(Color value)
        Sets the color to replace the unwanted ones with.
        Parameters:
        value - the replacement color
      • getReplacement

        public Color getReplacement()
        Returns the color to replace the unwanted ones with.
        Returns:
        the replacement color
      • replacementTipText

        public String replacementTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the gui