com.aspose.omr

## Class TextOcrElement

- java.lang.Object
- - com.aspose.omr.BasicElement
  - - com.aspose.omr.OmrElement
    - - com.aspose.omr.TextOcrElement

-     public class TextOcrElement
      extends OmrElement

  Represent an OCR block.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TextOcrElement(String name, Point2D.Float position, Dimension2D.Float size)` Initializes a new instance of the `TextOcrElement` class.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `extractData(OmrImage image, OmrConfig ignored)` Extracts data from a portion of scanned OMR sheet assigned to this element.
    `static String` | `getResource()` Gets path to the OCR resources file.
    `static void` | `setResource(String value)` Sets path to the OCR resources file.

    - ### Methods inherited from class com.aspose.omr.OmrElement

      `getCells, getConfiguration, isHorizontal, isHorizontal, loadProperties, saveProperties, setConfiguration`

    - ### Methods inherited from class com.aspose.omr.BasicElement

      `getName, getPosition, getSize, setName, setPosition, setSize`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### TextOcrElement

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

      Initializes a new instance of the `TextOcrElement` 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 String extractData(OmrImage image,
                           OmrConfig ignored)

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

      Specified by:
        `extractData` in class `BasicElement`
      Parameters:
        `image` - The image to extract data from.
        `ignored` - Configuration for OMR extraction algorithm (ignored.)
      Returns:
        A string that contains data extracted from the sheet.

    - #### getResource

          public static String getResource()

      Gets path to the OCR resources file. This must be set before data extraction.

      Returns:
        path to the OCR resources file

    - #### setResource

          public static void setResource(String value)

      Sets path to the OCR resources file. This must be set before data extraction.

      Parameters:
        `value` - path to the OCR resources file

Copyright © 2014. All rights reserved.