Class GridElement

  • public class GridElement
    extends OmrElement

    Represents an OMR grid element

    • Constructor Detail

      • GridElement

        public GridElement(String name,
                   Point2D.Float position,
                   Dimension2D size)

        Initializes a new instance of the GridElement class.

        name - The name of the element.
        position - Element position, in millimeters, relative to top left corner of an image
        size - Size of the element, in millimeters.
    • Method Detail

      • extractData

        public String extractData(OmrImage image,
                         OmrConfig config)

        Extracts data from a portion of scanned OMR sheet assigned to this element.

        Specified by:
        extractData in class BasicElement
        image - The image to extract data from.
        config - Configuration for OMR extraction algorithm.
        An string that contains data extracted from the sheet.
      • getSections

        public List<GridSection> getSections()

        Gets a collection of sections of the grid.

      • setSectionsCount

        public void setSectionsCount(int count)

        A shortcut method for setting the sections count in the grid. Adds and removes elements from Sections as necessary.

        count - New sections count.