Commit 9d1681f25c926a79f20e3a1a1fc2deed6e354a11
1 parent
0e1d890a
Transform to remove FTE templates
Showing
1 changed file
with
32 additions
and
0 deletions
openbr/plugins/metadata/removefte.cpp
0 → 100644
| 1 | +#include <openbr/plugins/openbr_internal.h> | |
| 2 | + | |
| 3 | +namespace br | |
| 4 | +{ | |
| 5 | + | |
| 6 | +/*! | |
| 7 | + * \ingroup transforms | |
| 8 | + * \author Brendan Klare \cite bklare | |
| 9 | + * \brief Remove any templates that failed to enroll (FTE) | |
| 10 | + */ | |
| 11 | +class RemoveFTETransform : public UntrainableMetaTransform | |
| 12 | +{ | |
| 13 | + Q_OBJECT | |
| 14 | + | |
| 15 | + void project(const Template &src, Template &dst) const | |
| 16 | + { | |
| 17 | + qFatal("Not supported in RemoveFTE."); | |
| 18 | + } | |
| 19 | + | |
| 20 | + void project(const TemplateList &src, TemplateList &dst) const | |
| 21 | + { | |
| 22 | + for (int i = 0; i < src.size(); i++) | |
| 23 | + if (!src[i].file.fte) | |
| 24 | + dst.append(src[i]); | |
| 25 | + } | |
| 26 | +}; | |
| 27 | +BR_REGISTER(Transform, RemoveFTETransform) | |
| 28 | + | |
| 29 | +} // namespace br | |
| 30 | + | |
| 31 | +#include "imgproc/removefte.moc" | |
| 32 | + | ... | ... |