com.aspose.omr

## Class OmrEngine

- java.lang.Object
- - com.aspose.omr.OmrEngine

-     public class OmrEngine
      extends Object

  The main entry point for the users of the library. It collects all data necessary for data extractions.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `OmrEngine(OmrTemplate template)` Initializes a new instance of the `OmrEngine` class.
    `OmrEngine(OmrTemplate template, ProcessingPipeline pipeline)` Initializes a new instance of the `OmrEngine` class.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `changeProcessingPipeline(ProcessingPipeline newPipeline)` Replaces the image processing pipeline with a new one.
    `OmrProcessingResult` | `extractData(OmrImage[] documentImages)` Extracts data from a scanned OMR sheets.
    `OmrConfig` | `getConfiguration()` Gets global configuration for OMR extraction algorithm.
    `ProcessingPipeline` | `getProcessingPipeline()` Gets an instance of `ProcessingPipeline` that contains image processing algorithms used for pre-processing of a scanned image before data extraction.
    `OmrTemplate` | `getTemplate()` Gets a data template that describes data structure of an OMR sheet.
    `void` | `setConfiguration(OmrConfig value)` Sets global configuration for OMR extraction algorithm.
    `void` | `setTemplate(OmrTemplate value)` Sets a data template that describes data structure of an OMR sheet.

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

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

- - ### Constructor Detail

    - #### OmrEngine

          public OmrEngine(OmrTemplate template)

      Initializes a new instance of the `OmrEngine` class.

      Parameters:
        `template` - An instance of `OmrTemplate` to be used for data extraction.

    - #### OmrEngine

          public OmrEngine(OmrTemplate template,
                   ProcessingPipeline pipeline)

      Initializes a new instance of the `OmrEngine` class.

      Parameters:
        `template` - An instance of `OmrTemplate` to be used for data extraction.
        `pipeline` - An instance of `ProcessingPipeline` that contains image processing algorithms used for preprocessing of a scanned image before data extraction.

  - ### Method Detail

    - #### changeProcessingPipeline

          public void changeProcessingPipeline(ProcessingPipeline newPipeline)

      Replaces the image processing pipeline with a new one.

      Parameters:
        `newPipeline` - The new pipeline.

    - #### extractData

          public OmrProcessingResult extractData(OmrImage[] documentImages)

      Extracts data from a scanned OMR sheets.

      Parameters:
        `documentImages` - Collection of scanned pages, according to the template.
      Returns:
        An instance of `OmrProcessingResult` that contains data extracted from the sheet.

    - #### getConfiguration

          public OmrConfig getConfiguration()

      Gets global configuration for OMR extraction algorithm.

      Returns:
        global configuration for OMR extraction algorithm.

    - #### getProcessingPipeline

          public ProcessingPipeline getProcessingPipeline()

      Gets an instance of `ProcessingPipeline` that contains image processing algorithms used for pre-processing of a scanned image before data extraction.

      Returns:
        the processing pipeline

    - #### getTemplate

          public OmrTemplate getTemplate()

      Gets a data template that describes data structure of an OMR sheet.

      Returns:
        the template

    - #### setConfiguration

          public void setConfiguration(OmrConfig value)

      Sets global configuration for OMR extraction algorithm.

      Parameters:
        `value` - global configuration for OMR extraction algorithm.

    - #### setTemplate

          public void setTemplate(OmrTemplate value)

      Sets a data template that describes data structure of an OMR sheet.

      Parameters:
        `value` - the template

Copyright © 2014. All rights reserved.