Commit acceb8b8754febbb1c39bd62f05193453b232411
1 parent
ab5f003b
ClearRects transform
Showing
1 changed file
with
42 additions
and
0 deletions
openbr/plugins/metadata/clearrects.cpp
0 → 100644
| 1 | +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * | |
| 2 | + * Copyright 2016 Rank One Computing Corporation. | |
| 3 | + * * | |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); * | |
| 5 | + * you may not use this file except in compliance with the License. * | |
| 6 | + * You may obtain a copy of the License at * | |
| 7 | + * * | |
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 * | |
| 9 | + * * | |
| 10 | + * Unless required by applicable law or agreed to in writing, software * | |
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, * | |
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * | |
| 13 | + * See the License for the specific language governing permissions and * | |
| 14 | + * limitations under the License. * | |
| 15 | + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ | |
| 16 | + | |
| 17 | +#include <openbr/plugins/openbr_internal.h> | |
| 18 | + | |
| 19 | +namespace br | |
| 20 | +{ | |
| 21 | + | |
| 22 | +/*! | |
| 23 | + * \ingroup transforms | |
| 24 | + * \brief Clears the rects from a Template | |
| 25 | + * \author Brendan Klare \cite bklare | |
| 26 | + */ | |
| 27 | +class ClearRectsTransform : public UntrainableMetadataTransform | |
| 28 | +{ | |
| 29 | + Q_OBJECT | |
| 30 | + | |
| 31 | + void projectMetadata(const File &src, File &dst) const | |
| 32 | + { | |
| 33 | + dst = src; | |
| 34 | + dst.clearRects(); | |
| 35 | + } | |
| 36 | +}; | |
| 37 | + | |
| 38 | +BR_REGISTER(Transform, ClearRectsTransform) | |
| 39 | + | |
| 40 | +} // namespace br | |
| 41 | + | |
| 42 | +#include "metadata/clearrects.moc" | ... | ... |