public class GridElement extends OmrElement
Represents an OMR grid element
Constructor and Description |
---|
GridElement(String name,
Point2D.Float position,
Dimension2D size)
Initializes a new instance of the
GridElement class. |
Modifier and Type | Method and Description |
---|---|
String |
extractData(OmrImage image,
OmrConfig config)
Extracts data from a portion of scanned OMR sheet assigned to this element.
|
List<GridSection> |
getSections()
Gets a collection of sections of the grid.
|
void |
setSectionsCount(int count)
A shortcut method for setting the sections count in the grid.
|
getCells, getConfiguration, isHorizontal, loadProperties, saveProperties, setConfiguration, setHorizontal
getDataCollections, getName, getPosition, getSize, setName, setPosition, setSize
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 imagesize
- Size of the element, in millimeters.public String extractData(OmrImage image, OmrConfig config)
Extracts data from a portion of scanned OMR sheet assigned to this element.
extractData
in class BasicElement
image
- The image to extract data from.config
- Configuration for OMR extraction algorithm.public List<GridSection> getSections()
Gets a collection of sections of the grid.
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.Copyright © 2017. All Rights Reserved.