classify/flexfx.cpp

Go to the documentation of this file.
00001 
00020 /* =================
00021  Include Files and Type Defines
00022  ==================== */
00023 #include "flexfx.h"
00024 #include "featdefs.h"
00025 #include "variables.h"
00026 #include "sigmenu.h"
00027 #include "emalloc.h"
00028 #include <string.h>
00029 #include <stdio.h>
00030 
00031 /* =================
00032  Public Code
00033  ==================== */
00044 CHAR_DESC ExtractFlexFeatures(TBLOB *Blob, LINE_STATS *LineStats) { 
00045   int Type;
00046   CHAR_DESC CharDesc;
00047 
00048   CharDesc = NewCharDescription ();
00049 
00050   for (Type = 0; Type < NumFeatureSetsIn(CharDesc); Type++)
00051     if (ExtractorOf(Type) != NULL && ExtractorOf(Type)->Extractor != NULL)
00052       FeaturesOfType(CharDesc, Type) =
00053         ExtractUsing(ExtractorOf(Type)) (Blob, LineStats);
00054 
00055   return (CharDesc);
00056 
00057 }                                /* ExtractFlexFeatures */
00058 
00059 
00075 void InitFlexFXVars ()
00076 #define NamePrefix      "Enable"
00077 #define NameSuffix      "Features"
00078 {
00079   int Type;
00080 
00081   SetupExtractors();
00082   for (Type = 0; Type < NumFeaturesDefined (); Type++) {
00083     InitFXVarsUsing (ExtractorOf (Type)) ();
00084   }
00085 }                                /* InitFlexFXVars */

Generated on Wed Feb 28 19:49:10 2007 for Tesseract by  doxygen 1.5.1