com.aspose.omr

Class OmrPage



  • public class OmrPage
    extends Object

    Represents a page of an OMR document


     
     OmrTemplate template = new OmrTemplate(); //Initializes OmrTemplate
     OmrPage page = template.getPages().getItem(0); // Default page
     page.setWidth(100); // Set width 100
     page.setHeight(100); // Set height 100
     

    • Constructor Detail

      • OmrPage

        public OmrPage()

        Initializes a new instance of the OmrPage class.

    • Method Detail

      • extractData

        public Map extractData(OmrImage documentImage,
                      OmrConfig config)

        Extracts data from a scanned OMR sheet.

        Parameters:
        documentImage - The document Image.
        config - Configuration for OMR extraction algorithm.
        Returns:
        A Hashtable with element names as keys and their respective values as values.
      • getConfiguration

        public OmrConfig getConfiguration()

        Gets page-level configuration for OMR extraction algorithm. Overrides global configuration if set. If set to null (by default), global configuration will be used.


        This settings are used during data extraction only and are not saved in the template file.

      • getElements

        public OmrElementsCollection getElements()

        Gets the collection of OMR elements of the page.

      • getHeight

        public double getHeight()

        Gets or sets height of the page, in millimeters.

      • getSheetImage

        public OmrImage getSheetImage()

        Gets a sheet image associated with the page. The value can be null.

      • getWidth

        public double getWidth()

        Gets width of the page, in millimeters.

      • setConfiguration

        public void setConfiguration(OmrConfig value)

        Sets page-level configuration for OMR extraction algorithm. Overrides global configuration if set. If set to null (by default), global configuration will be used.


        This settings are used during data extraction only and are not saved in the template file.

      • setHeight

        public void setHeight(double value)

        Sets height of the page, in millimeters.

      • setSheetImage

        public void setSheetImage(OmrImage value)

        Sets a sheet image associated with the page. The value can be null.

      • setWidth

        public void setWidth(double value)

        Sets width of the page, in millimeters.