Commit 17a1aa722d61fe62509a46f90633f4e28ef3ee45

Authored by Josh Klontz
1 parent f2a2d07d

remove anonymizelandmarks

openbr/plugins/metadata/anonymizelandmarks.cpp deleted
1   -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2   - * Copyright 2012 The MITRE 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   -#include <openbr/plugins/openbr_internal.h>
17   -
18   -
19   -namespace br
20   -{
21   -
22   -/*!
23   - * \ingroup transforms
24   - * \brief Remove a name from a point/rect
25   - * \author Scott Klum \cite sklum
26   - */
27   -class AnonymizeLandmarksTransform : public UntrainableMetadataTransform
28   -{
29   - Q_OBJECT
30   - Q_PROPERTY(QStringList names READ get_names WRITE set_names RESET reset_names STORED false)
31   - BR_PROPERTY(QStringList, names, QStringList())
32   -
33   - void projectMetadata(const File &src, File &dst) const
34   - {
35   - dst = src;
36   -
37   - foreach (const QString &name, names) {
38   - if (src.contains(name)) {
39   - QVariant variant = src.value(name);
40   - if (variant.canConvert(QMetaType::QPointF)) {
41   - dst.appendPoint(variant.toPointF());
42   - } else if (variant.canConvert(QMetaType::QRectF)) {
43   - dst.appendRect(variant.toRectF());
44   - } else {
45   - qFatal("Cannot convert landmark to point or rect.");
46   - }
47   - }
48   - }
49   - }
50   -};
51   -
52   -BR_REGISTER(Transform, AnonymizeLandmarksTransform)
53   -
54   -} // namespace br
55   -
56   -#include "metadata/anonymizelandmarks.moc"