Class SizeFilter

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

    public class SizeFilter
    extends AbstractMetaObjectLocator
    Allows filtering the located objects based on the min/max width/height.

    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
     
    -locator <adams.flow.transformer.locateobjects.AbstractObjectLocator> (property: locator)
        The base locator to use.
        default: adams.flow.transformer.locateobjects.PassThrough
     
    -min-width <int> (property: minWidth)
        The minimum width; ignored if <= 0.
        default: -1
        minimum: -1
     
    -max-width <int> (property: maxWidth)
        The maximum width; ignored if <= 0.
        default: -1
        minimum: -1
     
    -min-height <int> (property: minHeight)
        The minimum height; ignored if <= 0.
        default: -1
        minimum: -1
     
    -max-height <int> (property: maxHeight)
        The maximum height; ignored if <= 0.
        default: -1
        minimum: -1
     
    Version:
    $Revision$
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_MinWidth

        protected int m_MinWidth
        the minimum width.
      • m_MaxWidth

        protected int m_MaxWidth
        the maximum width.
      • m_MinHeight

        protected int m_MinHeight
        the minimum height.
      • m_MaxHeight

        protected int m_MaxHeight
        the maximum height.
    • Constructor Detail

      • SizeFilter

        public SizeFilter()
    • Method Detail

      • setMinWidth

        public void setMinWidth​(int value)
        Sets the minimum width.
        Parameters:
        value - the width
      • getMinWidth

        public int getMinWidth()
        Returns the minimum width.
        Returns:
        the width
      • minWidthTipText

        public String minWidthTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setMaxWidth

        public void setMaxWidth​(int value)
        Sets the maximum width.
        Parameters:
        value - the width
      • getMaxWidth

        public int getMaxWidth()
        Returns the maximum width.
        Returns:
        the width
      • maxWidthTipText

        public String maxWidthTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setMinHeight

        public void setMinHeight​(int value)
        Sets the minimum height.
        Parameters:
        value - the height
      • getMinHeight

        public int getMinHeight()
        Returns the minimum height.
        Returns:
        the height
      • minHeightTipText

        public String minHeightTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setMaxHeight

        public void setMaxHeight​(int value)
        Sets the maximum height.
        Parameters:
        value - the height
      • getMaxHeight

        public int getMaxHeight()
        Returns the maximum height.
        Returns:
        the height
      • maxHeightTipText

        public String maxHeightTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • doLocate

        protected LocatedObjects doLocate​(BufferedImage image,
                                          boolean annotateOnly)
        Performs the actual locating of the objects.
        Specified by:
        doLocate in class AbstractObjectLocator
        Parameters:
        image - the image to process
        annotateOnly - whether to annotate only
        Returns:
        the containers of located objects