Commit 47078a758bb69cdf5a98bee44061e30168222e6c

Authored by Josh Klontz
1 parent 259b3639

deprecated br-print

app/CMakeLists.txt
@@ -9,7 +9,6 @@ if(NOT ${BR_EMBEDDED}) @@ -9,7 +9,6 @@ if(NOT ${BR_EMBEDDED})
9 add_subdirectory(br-download) 9 add_subdirectory(br-download)
10 add_subdirectory(br-crawl) 10 add_subdirectory(br-crawl)
11 add_subdirectory(br-gui) 11 add_subdirectory(br-gui)
12 - add_subdirectory(br-print)  
13 add_subdirectory(br-search) 12 add_subdirectory(br-search)
14 add_subdirectory(br-select) 13 add_subdirectory(br-select)
15 add_subdirectory(br-serve) 14 add_subdirectory(br-serve)
app/br-print/CMakeLists.txt deleted
1 -add_executable(br-print br-print.cpp ${BR_RESOURCES})  
2 -target_link_libraries(br-print openbr ${BR_THIRDPARTY_LIBS})  
3 -qt5_use_modules(br-print ${QT_DEPENDENCIES})  
4 -install(TARGETS br-print RUNTIME DESTINATION bin)  
app/br-print/br-print.cpp deleted
1 -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *  
2 - * Copyright 2014 Noblis *  
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 <cstdlib>  
18 -#include <cstring>  
19 -#include <openbr/universal_template.h>  
20 -  
21 -static void help()  
22 -{  
23 - printf("br-print [args]\n"  
24 - "================\n"  
25 - "* __stdin__ - Templates\n"  
26 - "* __stdout__ - Template _data_\n"  
27 - "\n"  
28 - "_br-print_ extracts template data.\n");  
29 -}  
30 -  
31 -static void print_utemplate(br_const_utemplate utemplate, br_callback_context)  
32 -{  
33 - static bool first = true;  
34 - if (first) {  
35 - first = false;  
36 - } else {  
37 - printf("\n");  
38 - }  
39 -  
40 - fwrite(utemplate->data, 1, utemplate->size, stdout);  
41 -}  
42 -  
43 -int main(int argc, char *argv[])  
44 -{  
45 - for (int i=1; i<argc; i++)  
46 - if (!strcmp(argv[i], "-help")) { help(); exit(EXIT_SUCCESS); }  
47 -  
48 - br_iterate_utemplates_file(stdin, print_utemplate, NULL, false);  
49 - return EXIT_SUCCESS;  
50 -}  
openbr/openbr_plugin.cpp
@@ -956,6 +956,7 @@ void br::Context::initialize(int &amp;argc, char *argv[], QString sdkPath, bool useG @@ -956,6 +956,7 @@ void br::Context::initialize(int &amp;argc, char *argv[], QString sdkPath, bool useG
956 Globals = new Context(); 956 Globals = new Context();
957 Globals->init(File()); 957 Globals->init(File());
958 Globals->useGui = useGui; 958 Globals->useGui = useGui;
  959 + Globals->algorithm = "Identity";
959 960
960 Common::seedRNG(); 961 Common::seedRNG();
961 962
openbr/plugins/gallery.cpp
@@ -236,6 +236,31 @@ BR_REGISTER(Gallery, utGallery) @@ -236,6 +236,31 @@ BR_REGISTER(Gallery, utGallery)
236 236
237 /*! 237 /*!
238 * \ingroup galleries 238 * \ingroup galleries
  239 + * \brief Newline-separated br_universal_template data.
  240 + * \author Josh Klontz \cite jklontz
  241 + */
  242 +class utdGallery : public BinaryGallery
  243 +{
  244 + Q_OBJECT
  245 +
  246 + Template readTemplate()
  247 + {
  248 + qFatal("Not supported");
  249 + }
  250 +
  251 + void write(const Template &t)
  252 + {
  253 + if (t.empty())
  254 + return;
  255 + gallery.write(QByteArray((const char*) t.m().data, t.m().rows * t.m().cols * t.m().elemSize()));
  256 + gallery.write("\n");
  257 + }
  258 +};
  259 +
  260 +BR_REGISTER(Gallery, utdGallery)
  261 +
  262 +/*!
  263 + * \ingroup galleries
239 * \brief Reads/writes templates to/from folders. 264 * \brief Reads/writes templates to/from folders.
240 * \author Josh Klontz \cite jklontz 265 * \author Josh Klontz \cite jklontz
241 * \param regexp An optional regular expression to match against the files extension. 266 * \param regexp An optional regular expression to match against the files extension.