com.aspose.omr.elements

Class BasicElement

    • Constructor Detail

      • BasicElement

        protected BasicElement(String name,
                    Point2D.Float position,
                    Dimension2D size)

        Initializes a new instance of the BasicElement class.

        Parameters:
        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 abstract String extractData(OmrImage image,
                         OmrConfig config)

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

        Parameters:
        image - The image to extract data from.
        config - Global configuration for OMR extraction algorithm.
        Returns:
        A string that contains data extracted from the sheet.
      • getDataCollections

        public List<com.aspose.omr.elements.DataCollection> getDataCollections()

        Gets data collections registered for this element.

      • getName

        public String getName()

        Gets the name of the element. Value cannot be null.

      • getPosition

        public Point2D.Float getPosition()

        Gets position, in millimeters, relative to top left corner of an image

      • getSize

        public Dimension2D getSize()

        Gets size of the element, in millimeters.

      • loadProperties

        public void loadProperties(com.aspose.omr.StringDictionary properties)

        Initializes the properties of an element from their string representation.

        Parameters:
        properties - A collection of properties' values.
      • saveProperties

        public Map<String,String> saveProperties()

        Converts values of the properties of an element from their string representation.

        Returns:
        A collection of properties' values.
      • setName

        public void setName(String value)

        Sets the name of the element. Value cannot be null.

      • setPosition

        public void setPosition(Point2D.Float value)

        Sets position, in millimeters, relative to top left corner of an image

      • setSize

        public void setSize(Dimension2D value)

        Sets size of the element, in millimeters.