public class GridElement extends OmrElement
Represents an OMR grid element
| Constructor and Description |
|---|
GridElement(String name,
Point2D.Float position,
Dimension2D.Float 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, isHorizontal, loadProperties, saveProperties, setConfigurationgetName, getPosition, getSize, setName, setPosition, setSizepublic GridElement(String name, Point2D.Float position, Dimension2D.Float 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 BasicElementimage - 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 © 2014. All rights reserved.