Returns the box file name corresponding to the given image_filename.
| 96 | |
| 97 | // Returns the box file name corresponding to the given image_filename. |
| 98 | STRING 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 |
no test coverage detected