OmrEngine
Contents
[
Hide
]OmrEngine class
The OMR engine. Handles the creation of the template and image processing classes and GUI components.
public class OmrEngine
Constructors
Name | Description |
---|---|
OmrEngine() | The default constructor. |
Methods
Name | Description |
---|---|
AddPlugin(IPlugin) | Register new plugin |
GenerateJSONTemplate(string, GlobalPageSettings, Encoding) | Creates a template (.omr) and template image based on .json markup |
GenerateJSONTemplateFromString(string, GlobalPageSettings, ImageCollection) | Creates a template (.omr) and template image based on JSON markup |
GenerateTemplate(string, Encoding) | Creates a template (.omr) and template image based on text markup |
GenerateTemplate(string[], ImageCollection) | Creates a template (.omr) and template image based on an array of the markup lines |
GenerateTemplate(MemoryStream, ImageCollection, Encoding) | Creates a template (.omr) and template image based on MemoryStream |
GenerateTemplate(string, GlobalPageSettings, Encoding) | Creates a template (.omr) and template image based on text markup |
GenerateTemplate(string, string[], Encoding) | Creates a template (.omr) and template image based on text markup |
GenerateTemplate(string[], GlobalPageSettings, ImageCollection) | Creates a template (.omr) and template image based on an array of the markup lines |
GenerateTemplate(TemplateConfig, GlobalPageSettings, ImageCollection) | Creates a template (.omr) and template image based on Template object |
GenerateTemplate(MemoryStream, GlobalPageSettings, ImageCollection, Encoding) | Creates a template (.omr) and template image based on MemoryStream |
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
- namespace Aspose.OMR.Api
- assembly Aspose.OMR