com.aspose.omr

## Class BarcodeElement

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

-     public class BarcodeElement
      extends OmrElement

  Represent a BarCode element block.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `BarcodeElement(String name, Point2D.Float position, Dimension2D.Float size)` Initializes a new instance of the `BarcodeElement` 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.
    `long` | `getBarCodeType()` Gets the BarCode type to extract.
    `void` | `loadProperties(StringDictionary properties)` Initializes the properties of an element from their string representation.
    `StringDictionary` | `saveProperties()` Converts values of the properties of an element from their string representation.
    `void` | `setBarCodeType(long barcodeType)` Sets the BarCode type to extract.

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

      `getCells, getConfiguration, isHorizontal, isHorizontal, 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

    - #### BarcodeElement

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

      Initializes a new instance of the `BarcodeElement` 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.

    - #### getBarCodeType

          public long getBarCodeType()

      Gets the BarCode type to extract.

      Returns:
        The BarCode type to extract.

    - #### loadProperties

          public void loadProperties(StringDictionary properties)

      Initializes the properties of an element from their string representation.

      Overrides:
        `loadProperties` in class `OmrElement`
      Parameters:
        `properties` - A collection of properties' values.

    - #### saveProperties

          public StringDictionary saveProperties()

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

      Overrides:
        `saveProperties` in class `OmrElement`
      Returns:
        A collection of properties' values.

    - #### setBarCodeType

          public void setBarCodeType(long barcodeType)
                              throws IllegalArgumentException

      Sets the BarCode type to extract.

      Parameters:
        `barcodeType` - The BarCode type to extract. See the com.aspose.barcoderecognition.BarCodeReadType for the list of possible values.
      Throws:
        `IllegalAccessException`
        `UnsupportedOperationException`
        `IllegalArgumentException`

Copyright © 2014. All rights reserved.