Class LabeledRegions

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

    public class LabeledRegions
    extends AbstractSubImagesGenerator
    Extracts the sub-images according to the region definitions.
    Additional report values:
    - Region: for the region
    - Coordinates: for the 1-based coordinates (x,y,w,h)

    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
        min-user-mode: Expert
     
    -prefix <java.lang.String> (property: prefix)
        The report field prefix used in the report.
        default: Object.
     
    -partial <boolean> (property: partial)
        If enabled, partial hits are included as well.
        default: false
     
    -fix-invalid <boolean> (property: fixInvalid)
        If enabled, objects that fall partially outside the image boundaries get
        fixed (eg when allowing partial hits).
        default: false
     
    -region <adams.core.base.LabeledRectangle> [-region ...] (property: regions)
        The regions to extract (x y w h label, 0 or 1-based x/y).
        default:
     
    -one-based-coords <boolean> (property: oneBasedCoords)
        If enabled, the coordinates are consisdered starting at 1 rather than 0.
        default: true
     
    -label-key <java.lang.String> (property: labelKey)
        The key for the label in the meta-data.
        default: type
     
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_OneBasedCoords

        protected boolean m_OneBasedCoords
        whether the regions are 1-based or 0-based.
      • m_LabelKey

        protected String m_LabelKey
        the meta-data key for the label.
    • Constructor Detail

      • LabeledRegions

        public LabeledRegions()
    • Method Detail

      • setRegions

        public void setRegions​(LabeledRectangle[] value)
        Sets the regions to extract (x y w h, 0 or 1-based x/y).
        Parameters:
        value - the regions
      • getRegions

        public LabeledRectangle[] getRegions()
        Returns the regions to extract (x y w h, 0 or 1-based x/y).
        Returns:
        the regions
      • regionsTipText

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

        public void setOneBasedCoords​(boolean value)
        Sets whether the coordinates start at 1 or 0.
        Parameters:
        value - true if 1-based coordinates
      • getOneBasedCoords

        public boolean getOneBasedCoords()
        Returns whether the coordinates start at 1 or 0.
        Returns:
        true if 1-based coordinates
      • oneBasedCoordsTipText

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

        public void setLabelKey​(String value)
        Sets the key for the label in the meta-data.
        Parameters:
        value - the key
      • getLabelKey

        public String getLabelKey()
        Returns the key for the label in the meta-data.
        Returns:
        the key
      • labelKeyTipText

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