private G8PageIteratorLevel GetPageIteratorLevel (Tesseract.PageIteratorLevel level)
 {
     switch (level) {
     case Tesseract.PageIteratorLevel.Block:
         return G8PageIteratorLevel.Block;
     case Tesseract.PageIteratorLevel.Paragraph:
         return G8PageIteratorLevel.Paragraph;
     case Tesseract.PageIteratorLevel.Symbol:
         return G8PageIteratorLevel.Symbol;
     case Tesseract.PageIteratorLevel.Textline:
         return G8PageIteratorLevel.Textline;
     case Tesseract.PageIteratorLevel.Word:
         return G8PageIteratorLevel.Word;
     default:
         return G8PageIteratorLevel.Word;
     }
 }
 public List<Result> Results (Tesseract.PageIteratorLevel level)
 {
     var pageIterationLevel = GetPageIteratorLevel (level);
     return this._api.RecognizedBlocksByIteratorLevel (pageIterationLevel)
         .Select (r => ConvertToResult (r))
         .ToList ();
 }
 public void SetPageSegmentationMode (Tesseract.PageSegmentationMode mode)
 {
     switch (mode) {
     case PageSegmentationMode.Auto:
         _api.PageSegmentationMode = G8PageSegmentationMode.Auto;
         break;
     case PageSegmentationMode.AutoOnly:
         _api.PageSegmentationMode = G8PageSegmentationMode.AutoOnly;
         break;
     case PageSegmentationMode.AutoOsd:
         _api.PageSegmentationMode = G8PageSegmentationMode.AutoOSD;
         break;
     case PageSegmentationMode.CircleWord:
         _api.PageSegmentationMode = G8PageSegmentationMode.CircleWord;
         break;
     case PageSegmentationMode.OsdOnly:
         _api.PageSegmentationMode = G8PageSegmentationMode.OSDOnly;
         break;
     case PageSegmentationMode.SingleBlock:
         _api.PageSegmentationMode = G8PageSegmentationMode.SingleBlock;
         break;
     case PageSegmentationMode.SingleBlockVertText:
         _api.PageSegmentationMode = G8PageSegmentationMode.SingleBlockVertText;
         break;
     case PageSegmentationMode.SingleChar:
         _api.PageSegmentationMode = G8PageSegmentationMode.SingleChar;
         break;
     case PageSegmentationMode.SingleColumn:
         _api.PageSegmentationMode = G8PageSegmentationMode.SingleColumn;
         break;
     case PageSegmentationMode.SingleLine:
         _api.PageSegmentationMode = G8PageSegmentationMode.SingleLine;
         break;
     case PageSegmentationMode.SingleWord:
         _api.PageSegmentationMode = G8PageSegmentationMode.SingleWord;
         break;
     case PageSegmentationMode.SparseText:
         _api.PageSegmentationMode = G8PageSegmentationMode.SparseText;
         break;
     case PageSegmentationMode.SparseTextOsd:
         _api.PageSegmentationMode = G8PageSegmentationMode.SparseTextOSD;
         break;
     }
 }
 public void SetOcrEngineMode (Tesseract.OcrEngineMode mode)
 {
     switch (mode) {
     case OcrEngineMode.CubeOnly:
         _api.EngineMode = G8OCREngineMode.CubeOnly;
         break;
     case OcrEngineMode.TesseractCubeCombined:
         _api.EngineMode = G8OCREngineMode.TesseractCubeCombined;
         break;
     case OcrEngineMode.TesseractOnly:
         _api.EngineMode = G8OCREngineMode.TesseractOnly;
         break;
     }
 }
 public void SetRectangle (Tesseract.Rectangle rect)
 {
     _api.Rect = new CGRect (rect.Left, rect.Top, rect.Width, rect.Height);
 }
 public void SetRectangle (Tesseract.Rectangle? rect)
 {
     CheckIfInitialized ();
     _rect = rect;
 }