classify/fxdefs.cpp

Go to the documentation of this file.
00001 
00019 #include "fxdefs.h"
00020 #include "featdefs.h"
00021 #include "mf.h"
00022 #include "outfeat.h"
00023 #include "picofeat.h"
00024 #include "normfeat.h"
00025 
00026 /* =================
00027  Global Data Definitions and Declarations
00028  ==================== */
00030 int ExtractMode;
00031 
00032 // Definitions of extractors separated from feature definitions.
00033 DefineFeatureExt (MicroFeatureExt, ExtractMicros, InitMicroFXVars)
00034 DefineFeatureExt (PicoFeatExt, NULL, DefaultInitFXVars)
00035 DefineFeatureExt (CharNormExt, ExtractCharNormFeatures, DefaultInitFXVars)
00036 DefineFeatureExt (OutlineFeatExt, NULL, DefaultInitFXVars)
00037 
00038 FEATURE_EXT_STRUCT* ExtractorDefs[NUM_FEATURE_TYPES] = {
00039   &MicroFeatureExt,
00040   &PicoFeatExt,
00041   &OutlineFeatExt,
00042   &CharNormExt
00043 };
00044 
00045 
00046 /* =================
00047  Public Code
00048  ==================== */
00049 
00053 void SetupExtractors() {
00054   for (int i = 0; i < NUM_FEATURE_TYPES; ++i)
00055     ExtractorOf(i) = ExtractorDefs[i];
00056 }
00057 
00067 void GetLineStatsFromRow(TEXTROW *Row, LINE_STATS *LineStats) { 
00068   LineStats->Baseline = &(Row->baseline);
00069   LineStats->XHeightLine = &(Row->xheight);
00070   LineStats->xheight = Row->lineheight;
00071   LineStats->AscRise = Row->ascrise;
00072   LineStats->DescDrop = Row->descdrop;
00073   LineStats->TextRow = Row;      /* kludge - only needed by fx for */
00074   /* fast matcher - remove later */
00075 
00076 }                                /* GetLineStatsFromRow */

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