27 #define PICO_FEATURE_LENGTH 0.05 176 int NumSetsToWrite = 0;
197 bool anything_written =
false;
198 bool well_formed =
true;
204 if (std::isnan(feat->
Params[p]) || std::isinf(feat->
Params[p]))
207 anything_written =
true;
214 return anything_written && well_formed;
248 for (; NumSetsToRead > 0; NumSetsToRead--) {
249 tfscanf(File,
"%s", ShortName);
271 const char *ShortName) {
274 return static_cast<uint32_t
>(i);
int tfscanf(FILE *stream, const char *format,...)
#define PICO_FEATURE_LENGTH
void FreeCharDescription(CHAR_DESC CharDesc)
const FEATURE_DESC_STRUCT MicroFeatureDesc
const FEATURE_DESC_STRUCT GeoFeatDesc
#define NUM_FEATURE_TYPES
CHAR_DESC ReadCharDescription(const FEATURE_DEFS_STRUCT &FeatureDefs, FILE *File)
StartParamDesc(MicroFeatureParams) DefineParam(0
const FEATURE_DESC_STRUCT IntFeatDesc
DefineParam(0, 0, -0.25, 0.75) DefineParam(0
void WriteFeatureSet(FEATURE_SET FeatureSet, STRING *str)
const char * kGeoFeatureType
const FEATURE_DESC_STRUCT OutlineFeatDesc
TESS_API float PicoFeatureLength
MicroFeatureParams CharNormParams EndParamDesc DefineFeature(IntFeatDesc, 2, 1, kIntFeatureType, IntFeatParams) StartParamDesc(GeoFeatParams) DefineParam(0
void InitFeatureDefs(FEATURE_DEFS_STRUCT *featuredefs)
FEATURE_SET FeatureSets[NUM_FEATURE_TYPES]
const char * kMicroFeatureType
bool ValidCharDescription(const FEATURE_DEFS_STRUCT &FeatureDefs, CHAR_DESC CharDesc)
void add_str_int(const char *str, int number)
FEATURE_SET ReadFeatureSet(FILE *File, const FEATURE_DESC_STRUCT *FeatureDesc)
void FreeFeatureSet(FEATURE_SET FeatureSet)
const FEATURE_DESC_STRUCT * FeatureDesc[NUM_FEATURE_TYPES]
const FEATURE_DESC_STRUCT CharNormDesc
uint32_t ShortNameToFeatureType(const FEATURE_DEFS_STRUCT &FeatureDefs, const char *ShortName)
const char * kCNFeatureType
TESS_API const FEATURE_DESC_STRUCT PicoFeatDesc
CHAR_DESC_STRUCT * CHAR_DESC
const char * kIntFeatureType
CHAR_DESC NewCharDescription(const FEATURE_DEFS_STRUCT &FeatureDefs)
void WriteCharDescription(const FEATURE_DEFS_STRUCT &FeatureDefs, CHAR_DESC CharDesc, STRING *str)
const FEATURE_DESC_STRUCT * Type