using Leadtools;
using Leadtools.Barcode;
using Leadtools.Codecs;
using Leadtools.Forms.Common;
using Leadtools.Ocr;
using Leadtools.Forms.Processing;
using Leadtools.Forms.Recognition;
using Leadtools.Forms.Recognition.Barcode;
using Leadtools.Forms.Recognition.Ocr;
///This method sets the object managers.
public void SetObjectManagers(FormRecognitionEngine recognitionEngine,
IOcrEngine formsOcrEngine,
BarcodeEngine formsBarcodeEngine,
bool enableDefault,
bool enableOcr,
bool enableBarcode)
{
if (recognitionEngine == null)
return;
if (enableDefault)
{
DefaultObjectsManager defaultObjectManager = new DefaultObjectsManager();
recognitionEngine.ObjectsManagers.Add(defaultObjectManager);
}
if (enableOcr)
{
OcrObjectsManager ocrObjectManager = new OcrObjectsManager(formsOcrEngine);
recognitionEngine.ObjectsManagers.Add(ocrObjectManager);
}
if (enableBarcode)
{
BarcodeObjectsManager barcodeObjectManager = new BarcodeObjectsManager(formsBarcodeEngine);
recognitionEngine.ObjectsManagers.Add(barcodeObjectManager);
}
}