Class SimpleBlockFill

    • Field Detail

      • ANNOTATION

        public static final int ANNOTATION
        the value for annotation.
      • NEGATIVE

        public static final int NEGATIVE
        the value for a negative region.
      • m_Finder

        protected ObjectFinder m_Finder
        the object finder to use.
      • m_NumCols

        protected int m_NumCols
        the number of columns.
      • m_NumRows

        protected int m_NumRows
        the number of rows.
      • m_ScaleFactor

        protected double m_ScaleFactor
        the scale factor to use on the image size.
    • Constructor Detail

      • SimpleBlockFill

        public SimpleBlockFill()
    • Method Detail

      • setFinder

        public void setFinder​(ObjectFinder value)
        Sets the object finder to use.
        Parameters:
        value - the finder
      • getFinder

        public ObjectFinder getFinder()
        Returns the object finder in use.
        Returns:
        the finder
      • finderTipText

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

        public void setNumCols​(int value)
        Sets the number of columns in the grid.
        Parameters:
        value - the number
      • getNumCols

        public int getNumCols()
        Returns the number of columns in the grid.
        Returns:
        the number
      • numColsTipText

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

        public void setNumRows​(int value)
        Sets the number of rows in the grid.
        Parameters:
        value - the number
      • getNumRows

        public int getNumRows()
        Returns the number of rows in the grid.
        Returns:
        the number
      • numRowsTipText

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

        public void setScaleFactor​(double value)
        Sets the scale factor for the image.
        Parameters:
        value - the factor
      • getScaleFactor

        public double getScaleFactor()
        Returns the scale factor for the image.
        Returns:
        the factor
      • scaleFactorTipText

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

        protected void findExtent​(IntArrayMatrixView matrix,
                                  int s,
                                  int t,
                                  boolean horizontal,
                                  int[] ext)
        Finds the largest horizontal or vertical extent from the specified position without hitting an annotation.
        Parameters:
        matrix - the matrix with the annotations
        s - the x starting point
        t - the y starting point
        horizontal - whether to determine extent horizontally or vertically
        ext - for storing the largest extent
      • isValidExtent

        protected boolean isValidExtent​(int[] ext)
        Checks whether the extent is valid.
        Parameters:
        ext - the extent to check
        Returns:
        true if valid
      • fillInArea

        protected void fillInArea​(IntArrayMatrixView matrix,
                                  LocatedObject obj,
                                  int color)
        Fills in the area of the object with the specified color.
        Parameters:
        matrix - the matrix to update
        obj - the object to fill in
        color - the color to use