Commit a222b5ba68550c7eb929e0f81c36676a5a789609

Authored by Scott Klum
1 parent fec9f047

Thinner logo

openbr/core/bee.cpp
@@ -107,6 +107,8 @@ void BEE::writeSigset(const QString &sigset, const br::FileList &files, bool ign @@ -107,6 +107,8 @@ void BEE::writeSigset(const QString &sigset, const br::FileList &files, bool ign
107 template <typename T> 107 template <typename T>
108 Mat readMatrix(const br::File &matrix, QString *targetSigset = NULL, QString *querySigset = NULL) 108 Mat readMatrix(const br::File &matrix, QString *targetSigset = NULL, QString *querySigset = NULL)
109 { 109 {
  110 + qDebug() << matrix;
  111 +
110 // Special case matrix construction 112 // Special case matrix construction
111 if (matrix == "Identity") { 113 if (matrix == "Identity") {
112 int rows = matrix.get<int>("rows", -1); 114 int rows = matrix.get<int>("rows", -1);
@@ -161,6 +163,9 @@ Mat readMatrix(const br::File &amp;matrix, QString *targetSigset = NULL, QString *qu @@ -161,6 +163,9 @@ Mat readMatrix(const br::File &amp;matrix, QString *targetSigset = NULL, QString *qu
161 int rows = words[1].toInt(); 163 int rows = words[1].toInt();
162 int cols = words[2].toInt(); 164 int cols = words[2].toInt();
163 165
  166 + qDebug() << rows;
  167 + qDebug() << cols;
  168 +
164 // Get matrix data 169 // Get matrix data
165 qint64 bytesExpected = (qint64)rows*(qint64)cols*(qint64)sizeof(T); 170 qint64 bytesExpected = (qint64)rows*(qint64)cols*(qint64)sizeof(T);
166 Mat m(rows, cols, OpenCVType<T,1>::make()); 171 Mat m(rows, cols, OpenCVType<T,1>::make());
openbr/core/plot.cpp
@@ -499,6 +499,7 @@ bool Plot(const QStringList &amp;files, const br::File &amp;destination, bool show) @@ -499,6 +499,7 @@ bool Plot(const QStringList &amp;files, const br::File &amp;destination, bool show)
499 (p.minor.size > 1 ? QString(" + scale_linetype_discrete(\"%1\")").arg(p.minor.header) : QString()) + 499 (p.minor.size > 1 ? QString(" + scale_linetype_discrete(\"%1\")").arg(p.minor.header) : QString()) +
500 QString(" + scale_x_log10(labels=percent) + scale_y_log10(labels=percent) + annotation_logticks()\n\n"))); 500 QString(" + scale_x_log10(labels=percent) + scale_y_log10(labels=percent) + annotation_logticks()\n\n")));
501 501
  502 +
502 p.file.write(qPrintable(QString("qplot(X, data=SD, geom=\"histogram\", fill=Y, position=\"identity\", alpha=I(1/2)") + 503 p.file.write(qPrintable(QString("qplot(X, data=SD, geom=\"histogram\", fill=Y, position=\"identity\", alpha=I(1/2)") +
503 QString(", xlab=\"Score%1\"").arg((p.flip ? p.major.size : p.minor.size) > 1 ? " / " + (p.flip ? p.major.header : p.minor.header) : QString()) + 504 QString(", xlab=\"Score%1\"").arg((p.flip ? p.major.size : p.minor.size) > 1 ? " / " + (p.flip ? p.major.header : p.minor.header) : QString()) +
504 QString(", ylab=\"Frequency%1\"").arg((p.flip ? p.minor.size : p.major.size) > 1 ? " / " + (p.flip ? p.minor.header : p.major.header) : QString()) + 505 QString(", ylab=\"Frequency%1\"").arg((p.flip ? p.minor.size : p.major.size) > 1 ? " / " + (p.flip ? p.minor.header : p.major.header) : QString()) +
@@ -507,11 +508,11 @@ bool Plot(const QStringList &amp;files, const br::File &amp;destination, bool show) @@ -507,11 +508,11 @@ bool Plot(const QStringList &amp;files, const br::File &amp;destination, bool show)
507 QString(" + theme(aspect.ratio=1)\n\n"))); 508 QString(" + theme(aspect.ratio=1)\n\n")));
508 509
509 p.file.write(qPrintable(QString("ggplot(CMC, aes(x=X, y=Y%1%2)) + xlab(\"Rank\") + ylab(\"Retrieval Rate\")").arg(p.major.size > 1 ? QString(" ,colour=factor(%1)").arg(p.major.header) : QString(), p.minor.size > 1 ? QString(", linetype=factor(%1)").arg(p.minor.header) : QString()) + 510 p.file.write(qPrintable(QString("ggplot(CMC, aes(x=X, y=Y%1%2)) + xlab(\"Rank\") + ylab(\"Retrieval Rate\")").arg(p.major.size > 1 ? QString(" ,colour=factor(%1)").arg(p.major.header) : QString(), p.minor.size > 1 ? QString(", linetype=factor(%1)").arg(p.minor.header) : QString()) +
510 - ((p.major.smooth || p.minor.smooth) ? (minimalist ? " + stat_summary(geom=\"line\", lwd=3, fun.y=mean)" : " + stat_summary(geom=\"line\", fun.y=min, aes(linetype=\"Min/Max\")) + stat_summary(geom=\"line\", fun.y=max, aes(linetype=\"Min/Max\")) + stat_summary(geom=\"line\", fun.y=mean, aes(linetype=\"Mean\")) + scale_linetype_manual(\"Legend\", values=c(\"Mean\"=1, \"Min/Max\"=2))") : " + geom_line()") + 511 + ((p.major.smooth || p.minor.smooth) ? (minimalist ? " + stat_summary(geom=\"line\", fun.y=mean)" : " + stat_summary(geom=\"line\", fun.y=min, aes(linetype=\"Min/Max\")) + stat_summary(geom=\"line\", fun.y=max, aes(linetype=\"Min/Max\")) + stat_summary(geom=\"line\", fun.y=mean, aes(linetype=\"Mean\")) + scale_linetype_manual(\"Legend\", values=c(\"Mean\"=1, \"Min/Max\"=2))") : " + geom_line()") +
511 (minimalist ? "" : " + scale_x_log10(labels=c(1,5,10,50,100), breaks=c(1,5,10,50,100)) + annotation_logticks(sides=\"b\")") + 512 (minimalist ? "" : " + scale_x_log10(labels=c(1,5,10,50,100), breaks=c(1,5,10,50,100)) + annotation_logticks(sides=\"b\")") +
512 (p.major.size > 1 ? getScale("colour", p.major.header, p.major.size) : QString()) + 513 (p.major.size > 1 ? getScale("colour", p.major.header, p.major.size) : QString()) +
513 (p.minor.size > 1 ? QString(" + scale_linetype_discrete(\"%1\")").arg(p.minor.header) : QString()) + 514 (p.minor.size > 1 ? QString(" + scale_linetype_discrete(\"%1\")").arg(p.minor.header) : QString()) +
514 - QString(" + theme_blank() + scale_y_continuous(labels=percent)\n\n"))); 515 + QString(" + theme_minimal() + scale_y_continuous(labels=percent)\n\n")));
515 516
516 p.file.write(qPrintable(QString("qplot(factor(%1)%2, data=BC, %3").arg(p.major.smooth ? (p.minor.header.isEmpty() ? "Algorithm" : p.minor.header) : p.major.header, (p.major.smooth || p.minor.smooth) ? ", Y" : "", (p.major.smooth || p.minor.smooth) ? "geom=\"boxplot\"" : "geom=\"bar\", position=\"dodge\", weight=Y") + 517 p.file.write(qPrintable(QString("qplot(factor(%1)%2, data=BC, %3").arg(p.major.smooth ? (p.minor.header.isEmpty() ? "Algorithm" : p.minor.header) : p.major.header, (p.major.smooth || p.minor.smooth) ? ", Y" : "", (p.major.smooth || p.minor.smooth) ? "geom=\"boxplot\"" : "geom=\"bar\", position=\"dodge\", weight=Y") +
517 (p.major.size > 1 ? QString(", fill=factor(%1)").arg(p.major.header) : QString()) + 518 (p.major.size > 1 ? QString(", fill=factor(%1)").arg(p.major.header) : QString()) +
openbr/gui/imageviewer.cpp
@@ -18,6 +18,7 @@ @@ -18,6 +18,7 @@
18 #include <QMutexLocker> 18 #include <QMutexLocker>
19 #include <QSizePolicy> 19 #include <QSizePolicy>
20 #include <QTimer> 20 #include <QTimer>
  21 +#include <QDebug>
21 22
22 #include "imageviewer.h" 23 #include "imageviewer.h"
23 24
@@ -36,6 +37,7 @@ void br::ImageViewer::setDefaultText(const QString &amp;text) @@ -36,6 +37,7 @@ void br::ImageViewer::setDefaultText(const QString &amp;text)
36 37
37 void br::ImageViewer::setImage(const QString &file, bool async) 38 void br::ImageViewer::setImage(const QString &file, bool async)
38 { 39 {
  40 + QMutexLocker locker(&mutex);
39 if(file.isNull()) src = QImage(); // Gets rid of runtime FileEngine::open warning 41 if(file.isNull()) src = QImage(); // Gets rid of runtime FileEngine::open warning
40 else src = QImage(file); 42 else src = QImage(file);
41 updatePixmap(async); 43 updatePixmap(async);
@@ -43,12 +45,14 @@ void br::ImageViewer::setImage(const QString &amp;file, bool async) @@ -43,12 +45,14 @@ void br::ImageViewer::setImage(const QString &amp;file, bool async)
43 45
44 void br::ImageViewer::setImage(const QImage &image, bool async) 46 void br::ImageViewer::setImage(const QImage &image, bool async)
45 { 47 {
  48 + QMutexLocker locker(&mutex);
46 src = image.copy(); 49 src = image.copy();
47 updatePixmap(async); 50 updatePixmap(async);
48 } 51 }
49 52
50 void br::ImageViewer::setImage(const QPixmap &pixmap, bool async) 53 void br::ImageViewer::setImage(const QPixmap &pixmap, bool async)
51 { 54 {
  55 + QMutexLocker locker(&mutex);
52 src = pixmap.toImage(); 56 src = pixmap.toImage();
53 updatePixmap(async); 57 updatePixmap(async);
54 } 58 }
share/openbr/openbr.svg
@@ -25,14 +25,14 @@ @@ -25,14 +25,14 @@
25 inkscape:pageopacity="0.0" 25 inkscape:pageopacity="0.0"
26 inkscape:pageshadow="2" 26 inkscape:pageshadow="2"
27 inkscape:zoom="1.1572757" 27 inkscape:zoom="1.1572757"
28 - inkscape:cx="285.7618"  
29 - inkscape:cy="191.07932" 28 + inkscape:cx="391.0146"
  29 + inkscape:cy="232.5551"
30 inkscape:document-units="px" 30 inkscape:document-units="px"
31 - inkscape:current-layer="layer1" 31 + inkscape:current-layer="text3808"
32 showgrid="false" 32 showgrid="false"
33 - inkscape:window-width="1389"  
34 - inkscape:window-height="856"  
35 - inkscape:window-x="51" 33 + inkscape:window-width="1222"
  34 + inkscape:window-height="756"
  35 + inkscape:window-x="58"
36 inkscape:window-y="0" 36 inkscape:window-y="0"
37 inkscape:window-maximized="1" /> 37 inkscape:window-maximized="1" />
38 <metadata 38 <metadata
@@ -74,7 +74,7 @@ @@ -74,7 +74,7 @@
74 style="font-size:602.20269775px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" 74 style="font-size:602.20269775px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
75 id="text3808"> 75 id="text3808">
76 <path 76 <path
77 - d="m 139.95187,979.03625 0,114.32505 c 0,0 55.98075,0 83.97112,0 0,0 73.21541,0 83.97112,0 10.75572,0 27.99037,-35.1782 27.99037,-57.1625 0,-21.9843 -17.23464,-57.16255 -27.99037,-57.16255 -10.75573,10e-6 -83.97112,0 -83.97112,0 m -83.97112,-187.49303 0,114.32502 83.97112,0 83.97112,0 c 8.29626,0 27.99037,-35.17826 27.99037,-57.16251 0,-21.98425 -19.69398,-57.16251 -27.99037,-57.16251 l -83.97112,0 m 0,-64.02201 c 0,0 68.80967,0 90.96871,0 22.15905,0 41.98556,0 41.98556,0 l 34.98797,54.87601 0,64.02201 c 0,28.9222 -5.34568,57.28993 -20.99278,77.74101 l -13.99519,18.29201 13.99519,18.292 c 14.09205,18.4186 20.99278,51.69325 20.99278,77.74105 l 0,128.044 -55.98075,0 0,-45.73 c -33.40248,25.4228 -76.13986,45.488 -111.96149,45.73 -31.46502,-2.1586 -56.36563,-10.8805 -83.76198,-28.3596 l -0.20914,28.3596 -55.98075,0 0,-80.0275 -3e-6,-358.98059" 77 + d="m 118.95909,967.60375 0,113.18175 c 0,0 44.47301,42.4232 104.9639,42.4232 0,0 40.58712,1.41 80.06423,-27.2386 39.47711,-28.6486 51.03065,-47.8711 51.03066,-74.7948 0,-26.92372 -19.78245,-53.57155 -30.53818,-53.57155 -10.75573,10e-6 -100.55671,0 -100.55671,0 m -104.9639,-198.92553 0,146.33602 104.9639,0 104.9639,0 c 8.29626,0 30.25785,-16.66361 31.01367,-74.21155 0.75582,-57.54794 -22.71728,-72.12447 -31.01367,-72.12447 l -104.9639,0 m 0,-41.15701 c 0,0 68.80967,0 90.96871,0 22.15905,0 41.98556,0 41.98556,0 l 34.98797,54.87601 0,64.02201 c 0,28.9222 -5.34568,57.28993 -20.99278,77.74101 l -13.99519,18.29201 13.99519,18.292 c 14.09205,18.4186 20.99278,51.69325 20.99278,77.74105 l 0,128.044 -36.73737,0 0,-66.3085 c -33.40248,25.4228 -95.38324,66.0665 -131.20487,66.3085 -31.46502,-2.1586 -77.56755,-15.4535 -104.9639,-32.9326 l 0,32.9326 -34.98797,0 0,-80.0275 -3e-6,-358.98059"
78 id="path3816" 78 id="path3816"
79 inkscape:connector-curvature="0" 79 inkscape:connector-curvature="0"
80 sodipodi:nodetypes="ccczzzccccszscccccsscssccccccccc" /> 80 sodipodi:nodetypes="ccczzzccccszscccccsscssccccccccc" />