Commit 9a4f7be72af3997aa07604295ba5e76ead05dd0c
1 parent
ff0fcb54
removed template gallery
Showing
1 changed file
with
0 additions
and
56 deletions
openbr/plugins/gallery/template.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 | - | |
| 17 | -#include <openbr/plugins/openbr_internal.h> | |
| 18 | -#include <openbr/core/qtutils.h> | |
| 19 | - | |
| 20 | -namespace br | |
| 21 | -{ | |
| 22 | - | |
| 23 | -/*! | |
| 24 | - * \ingroup galleries | |
| 25 | - * \brief Treat the file as a single binary Template. | |
| 26 | - * \author Josh Klontz \cite jklontz | |
| 27 | - */ | |
| 28 | -class templateGallery : public Gallery | |
| 29 | -{ | |
| 30 | - Q_OBJECT | |
| 31 | - | |
| 32 | - TemplateList readBlock(bool *done) | |
| 33 | - { | |
| 34 | - *done = true; | |
| 35 | - QByteArray data; | |
| 36 | - QtUtils::readFile(file.name.left(file.name.size()-QString(".template").size()), data); | |
| 37 | - return TemplateList() << Template(file, cv::Mat(1, data.size(), CV_8UC1, data.data()).clone()); | |
| 38 | - } | |
| 39 | - | |
| 40 | - void write(const Template &t) | |
| 41 | - { | |
| 42 | - (void) t; | |
| 43 | - qFatal("Not supported."); | |
| 44 | - } | |
| 45 | - | |
| 46 | - void init() | |
| 47 | - { | |
| 48 | - // | |
| 49 | - } | |
| 50 | -}; | |
| 51 | - | |
| 52 | -BR_REGISTER(Gallery, templateGallery) | |
| 53 | - | |
| 54 | -} // namespace br | |
| 55 | - | |
| 56 | -#include "gallery/template.moc" |