Class SimpleCrop

  • All Implemented Interfaces:
    Destroyable, GlobalInfoSupporter, LoggingLevelHandler, LoggingSupporter, OptionHandler, SizeOfHandler, CropAlgorithm<BufferedImage>, Serializable

    public class SimpleCrop
    extends AbstractCropAlgorithm
    Simple cropping algorithm that uses a fixed window. The user either specifies a window height/width (if both non-zero) or the bottom-right corner coordinates apart from the coordinates of the top-left corner.

    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
     
    -top <int> (property: top)
        The y position of the top-left corner.
        default: 0
        minimum: 0
     
    -left <int> (property: left)
        The x position of the top-left corner.
        default: 0
        minimum: 0
     
    -bottom <int> (property: bottom)
        The y position of the bottom-right corner; use -1 to use image height.
        default: -1
        minimum: -1
     
    -right <int> (property: right)
        The x position of the bottom-right corner; use -1 to use image width.
        default: -1
        minimum: -1
     
    -height <int> (property: height)
        The height of the crop rectangle; ignored if less than 1.
        default: 0
        minimum: 0
     
    -width <int> (property: width)
        The width of the crop rectangle, ignored if less than 1.
        default: 0
        minimum: 0
     
    Version:
    $Revision: 8487 $
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_Top

        protected int m_Top
        the y of the top-left corner.
      • m_Left

        protected int m_Left
        the x of the top-left corner.
      • m_Bottom

        protected int m_Bottom
        the y of the bottom-right corner.
      • m_Right

        protected int m_Right
        the x of the bottom-right corner.
      • m_Height

        protected int m_Height
        the height of the window.
      • m_Width

        protected int m_Width
        the width of the window.
    • Constructor Detail

      • SimpleCrop

        public SimpleCrop()
    • Method Detail

      • setTop

        public void setTop​(int value)
        Sets the y of the top-left corner.
        Parameters:
        value - the y
      • getTop

        public int getTop()
        Returns the y of the top-left corner.
        Returns:
        the y
      • topTipText

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

        public void setLeft​(int value)
        Sets the x of the top-left corner.
        Parameters:
        value - the x
      • getLeft

        public int getLeft()
        Returns the x of the top-left corner.
        Returns:
        the x
      • leftTipText

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

        public void setBottom​(int value)
        Sets the y of the bottom-right corner.
        Parameters:
        value - the y
      • getBottom

        public int getBottom()
        Returns the y of the bottom-right corner.
        Returns:
        the y
      • bottomTipText

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

        public void setRight​(int value)
        Sets the x of the bottom-right corner.
        Parameters:
        value - the x
      • getRight

        public int getRight()
        Returns the x of the bottom-right corner.
        Returns:
        the x
      • rightTipText

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

        public void setHeight​(int value)
        Sets the height of the crop rectangle.
        Parameters:
        value - the height, ignored if less than 1
      • getHeight

        public int getHeight()
        Returns the height of the crop rectangle.
        Returns:
        the height, ignored if less than 1
      • heightTipText

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

        public void setWidth​(int value)
        Sets the width of the crop rectangle.
        Parameters:
        value - the width, ignored if less than 1
      • getWidth

        public int getWidth()
        Returns the width of the window.
        Returns:
        the width, ignored if less than 1
      • widthTipText

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