From a88a4308b184b985e15e038aae8aa83eb55263d0 Mon Sep 17 00:00:00 2001 From: Theo Date: Tue, 4 Feb 2020 13:07:31 +0100 Subject: [PATCH] [FeaturesViewer] rename SIOPointFeature to PointFeature --- src/FeaturesViewer.cpp | 10 +++++----- src/FeaturesViewer.hpp | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/FeaturesViewer.cpp b/src/FeaturesViewer.cpp index cb988375..478b1976 100644 --- a/src/FeaturesViewer.cpp +++ b/src/FeaturesViewer.cpp @@ -27,11 +27,11 @@ void FeatureIORunnable::run() QString descType; std::tie(folder, viewId, descType) = _params; - std::vector features; - try + std::unique_ptr regions; + try { std::unique_ptr describer = feature::createImageDescriber(feature::EImageDescriberType_stringToEnum(descType.toStdString())); - features = feature::getSIOPointFeatures(*sfm::loadFeatures({folder.toLocalFile().toStdString()}, viewId, *describer)); + regions = sfm::loadFeatures({folder.toLocalFile().toStdString()}, viewId, *describer); } catch(std::exception& e) { @@ -39,8 +39,8 @@ void FeatureIORunnable::run() << "\n" << e.what(); } QList feats; - feats.reserve(static_cast(features.size())); - for(const auto& f : features) + feats.reserve(static_cast(regions->RegionCount())); + for(const auto& f : regions->Features()) feats.append(new Feature(f)); Q_EMIT resultReady(feats); } diff --git a/src/FeaturesViewer.hpp b/src/FeaturesViewer.hpp index 60cca88a..e6e2ae61 100644 --- a/src/FeaturesViewer.hpp +++ b/src/FeaturesViewer.hpp @@ -12,7 +12,7 @@ namespace qtAliceVision { /** - * @brief QObject wrapper around a SIOPointFeature. + * @brief QObject wrapper around a PointFeature. */ class Feature : public QObject { @@ -27,7 +27,7 @@ class Feature : public QObject Feature() = default; Feature(const Feature& other) { _feat = other._feat; } - explicit Feature(const aliceVision::feature::SIOPointFeature& feat, QObject* parent=nullptr): + explicit Feature(const aliceVision::feature::PointFeature& feat, QObject* parent=nullptr): QObject(parent), _feat(feat) {} @@ -37,10 +37,10 @@ class Feature : public QObject inline float scale() const { return _feat.scale(); } inline float orientation() const { return _feat.orientation(); } - const aliceVision::feature::SIOPointFeature& pointFeature() const { return _feat; } + const aliceVision::feature::PointFeature& pointFeature() const { return _feat; } private: - aliceVision::feature::SIOPointFeature _feat; + aliceVision::feature::PointFeature _feat; };