OmrEngine

OmrEngine class

The OMR engine. Handles the creation of the template and image processing classes and GUI components.

public class OmrEngine

Constructors

NameDescription
OmrEngine()The default constructor.

Methods

NameDescription
AddPlugin(IPlugin)Register new plugin
Generate(string[], GlobalPageSettings, ImageCollection)Creates a GenerationResult which contains template (.omr) and template image based on markup content
Generate(TemplateConfig, GlobalPageSettings, ImageCollection)Creates a GenerationResult which contains template (.omr) and template image based on markup content
Generate(Stream, GlobalPageSettings, ImageCollection, Encoding)Creates a GenerationResult which contains template (.omr) and template image based on markup stream
Generate(string, GlobalPageSettings, string[], Encoding)Creates a GenerationResult which contains template (.omr) and template image based on markup content stored by specified path
GetCorrectionControl(TemplateProcessor)Creates the CorrectionControl instance that allows working with OMR API using GUI. Takes TemplateProcessor as a parameter and only works with images created using specified template
GetTemplateProcessor(string)Creates the TemplateProcessor instance that allows working with specified template.
GetTemplateProcessor(MemoryStream, Encoding)Creates the TemplateProcessor instance that allows working with specified template.

Examples

// get template processor
OmrEngine engine = new OmrEngine();
TemplateProcessor templateProcessor = engine.GetTemplateProcessor(templatePath);
// get correction GUI control
OmrEngine engine = new OmrEngine();
TemplateProcessor templateProcessor = engine.GetTemplateProcessor(templatePath);
CorrectionControl control = engine.GetCorrectionControl(templateProcessor);
// generate template
OmrEngine engine = new OmrEngine();
GenerationResult result = engine.GenerateTemplate(markupPath);
if(result.ErrorCode == 0)
{
    result.Save(folderPath, templateName);
}

See Also