MCPcopy Create free account
hub / github.com/creatale/node-dv / BoxFileName

Function BoxFileName

deps/tesseract/ccstruct/boxread.cpp:98–106  ·  view source on GitHub ↗

Returns the box file name corresponding to the given image_filename.

Source from the content-addressed store, hash-verified

96
97// Returns the box file name corresponding to the given image_filename.
98STRING BoxFileName(const STRING& image_filename) {
99 STRING box_filename = image_filename;
100 const char *lastdot = strrchr(box_filename.string(), '.');
101 if (lastdot != NULL)
102 box_filename.truncate_at(lastdot - box_filename.string());
103
104 box_filename += ".box";
105 return box_filename;
106}
107
108// TODO(rays) convert all uses of ReadNextBox to use the new ReadAllBoxes.
109// Box files are used ONLY DURING TRAINING, but by both processes of

Callers 2

OpenBoxFileFunction · 0.85
ReadAllBoxesFunction · 0.85

Calls 2

truncate_atMethod · 0.80
stringMethod · 0.45

Tested by

no test coverage detected