←Select platform

ZoneManager Property

Summary
Provides support for determining the various zone types, recognition modules and fill methods supported by this engine type.
Syntax
C#
Objective-C
C++/CLI
Java
Python
public IOcrZoneManager ZoneManager { get; } 
@property (nonatomic, strong, readonly) LTOcrZoneManager *zoneManager 
public OcrZoneManager getZoneManager() 
property IOcrZoneManager^ ZoneManager { 
   IOcrZoneManager^ get(); 
} 
ZoneManager # get  (IOcrEngine) 

Property Value

The instance of the IOcrZoneManager object that provide support for determining the various zone types, recognition modules and fill methods supported by this IOcrEngine.

Remarks

The zone manager contains information about the following:

  • The zone types supported by this engine. For example, "Text", "Graphics" or "Table". For more information, refer to OcrZoneType.
  • The options used when detecting OMR (Optical Mark Recognition) zones. For more information, refer to IOcrZoneManager.OmrOptions.

For more information, refer to IOcrZoneManager.

You must call the Startup method before you can use the ZoneManager.

Example
C#
using Leadtools; 
using Leadtools.Codecs; 
using Leadtools.Ocr; 
using Leadtools.Forms.Common; 
using Leadtools.Document.Writer; 
using Leadtools.WinForms; 
 
public void ZoneManagerExample() 
{ 
   // Create an instance of the engine 
   using (IOcrEngine ocrEngine = OcrEngineManager.CreateEngine(OcrEngineType.LEAD)) 
   { 
      // Start the engine using default parameters 
      ocrEngine.Startup(null, null, null, LEAD_VARS.OcrLEADRuntimeDir); 
 
      // Get the zone manager 
      IOcrZoneManager ocrZoneManager = ocrEngine.ZoneManager; 
 
      // Show all the zone types supported by this engine 
      Console.WriteLine("Hit enter to show the supported zone types"); 
      //Console.ReadLine(); 
 
      OcrZoneType[] zoneTypes = ocrZoneManager.GetSupportedZoneTypes(); 
      Console.WriteLine("Supported zone types:"); 
      Console.WriteLine("---------------------"); 
      foreach (OcrZoneType zoneType in zoneTypes) 
         Console.WriteLine("  {0}", zoneType); 
 
      // Shutdown the engine 
      // Note: calling Dispose will also automatically shutdown the engine if it has been started 
      ocrEngine.Shutdown(); 
   } 
} 
 
static class LEAD_VARS 
{ 
   public const string OcrLEADRuntimeDir = @"C:\LEADTOOLS22\Bin\Common\OcrLEADRuntime"; 
} 
Requirements

Target Platforms

Help Version 22.0.2023.3.31
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Ocr Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.