From 1272d94c8bef878d35de0bc71939213748a925c0 Mon Sep 17 00:00:00 2001 From: Charles Otto Date: Thu, 29 May 2014 14:07:20 -0400 Subject: [PATCH] Update mtxOutput to take the gallery names as parameters --- openbr/plugins/misc.cpp | 2 +- openbr/plugins/output.cpp | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/openbr/plugins/misc.cpp b/openbr/plugins/misc.cpp index feb979e..2ad6ef7 100644 --- a/openbr/plugins/misc.cpp +++ b/openbr/plugins/misc.cpp @@ -662,7 +662,7 @@ class OutputTransform : public TimeVaryingTransform fragmentsPerCol = 1; } - output = QSharedPointer(Output::make(outputString, targetFiles, queryFiles)); + output = QSharedPointer(Output::make(outputString+"[targetGallery="+targetName+",queryGallery="+queryName+"]", targetFiles, queryFiles)); output->blockRows = fragmentsPerCol; output->blockCols = fragmentsPerRow; output->initialize(targetFiles, queryFiles); diff --git a/openbr/plugins/output.cpp b/openbr/plugins/output.cpp index b58bf49..569b00d 100644 --- a/openbr/plugins/output.cpp +++ b/openbr/plugins/output.cpp @@ -175,6 +175,12 @@ BR_REGISTER(Output, meltOutput) class mtxOutput : public Output { Q_OBJECT + + Q_PROPERTY(QString targetGallery READ get_targetGallery WRITE set_targetGallery RESET reset_targetGallery STORED false) + Q_PROPERTY(QString queryGallery READ get_queryGallery WRITE set_queryGallery RESET reset_queryGallery STORED false) + BR_PROPERTY(QString, targetGallery, "Unknown_Target") + BR_PROPERTY(QString, queryGallery, "Unknown_Query") + int headerSize, rowBlock, columnBlock; cv::Mat blockScores; @@ -194,9 +200,9 @@ class mtxOutput : public Output const int endian = 0x12345678; QByteArray header; header.append("S2\n"); - header.append(qPrintable(targetFiles.first().get("Gallery", "Unknown_Target"))); + header.append(qPrintable(targetGallery)); header.append("\n"); - header.append(qPrintable(queryFiles.first().get("Gallery", "Unknown_Query"))); + header.append(qPrintable(queryGallery)); header.append("\nMF "); header.append(qPrintable(QString::number(queryFiles.size()))); header.append(" "); -- libgit2 0.21.4