public abstract class BasicElement extends Object
The base class for elements of the OMR template.
Modifier | Constructor and Description |
---|---|
protected |
BasicElement(String name,
Point2D.Float position,
Dimension2D size)
Initializes a new instance of the
BasicElement class. |
Modifier and Type | Method and Description |
---|---|
abstract String |
extractData(OmrImage image,
OmrConfig config)
Extracts data from a portion of scanned OMR sheet assigned to this element.
|
List<com.aspose.omr.elements.DataCollection> |
getDataCollections()
Gets data collections registered for this element.
|
String |
getName()
Gets the name of the element.
|
Point2D.Float |
getPosition()
Gets position, in millimeters, relative to top left corner of an image
|
Dimension2D |
getSize()
Gets size of the element, in millimeters.
|
void |
loadProperties(com.aspose.omr.StringDictionary properties)
Initializes the properties of an element from their string representation.
|
Map<String,String> |
saveProperties()
Converts values of the properties of an element from their string representation.
|
void |
setName(String value)
Sets the name of the element.
|
void |
setPosition(Point2D.Float value)
Sets position, in millimeters, relative to top left corner of an image
|
void |
setSize(Dimension2D value)
Sets size of the element, in millimeters.
|
protected BasicElement(String name, Point2D.Float position, Dimension2D size)
Initializes a new instance of the BasicElement
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 abstract String extractData(OmrImage image, OmrConfig config)
Extracts data from a portion of scanned OMR sheet assigned to this element.
image
- The image to extract data from.config
- Global configuration for OMR extraction algorithm.public List<com.aspose.omr.elements.DataCollection> getDataCollections()
Gets data collections registered for this element.
public String getName()
Gets the name of the element. Value cannot be null.
public Point2D.Float getPosition()
Gets position, in millimeters, relative to top left corner of an image
public Dimension2D getSize()
Gets size of the element, in millimeters.
public void loadProperties(com.aspose.omr.StringDictionary properties)
Initializes the properties of an element from their string representation.
properties
- A collection of properties' values.public Map<String,String> saveProperties()
Converts values of the properties of an element from their string representation.
public void setName(String value)
Sets the name of the element. Value cannot be null.
public void setPosition(Point2D.Float value)
Sets position, in millimeters, relative to top left corner of an image
public void setSize(Dimension2D value)
Sets size of the element, in millimeters.
Copyright © 2017. All Rights Reserved.