Skip to content

Commit

Permalink
[FeaturesViewer] rename SIOPointFeature to PointFeature
Browse files Browse the repository at this point in the history
  • Loading branch information
Theo committed Feb 4, 2020
1 parent 9abaef6 commit 9517480
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions src/FeaturesViewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,20 @@ void FeatureIORunnable::run()
QString descType;
std::tie(folder, viewId, descType) = _params;

std::vector<feature::SIOPointFeature> features;
try
std::unique_ptr<aliceVision::feature::Regions> regions;
try
{
std::unique_ptr<feature::ImageDescriber> 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)
{
qDebug() << "[QtAliceVision] Failed to load features (" << descType << ") for view: " << viewId
<< "\n" << e.what();
}
QList<Feature*> feats;
feats.reserve(static_cast<int>(features.size()));
for(const auto& f : features)
feats.reserve(static_cast<int>(regions->RegionCount()));
for(const auto& f : regions->Features())
feats.append(new Feature(f));
Q_EMIT resultReady(feats);
}
Expand Down
8 changes: 4 additions & 4 deletions src/FeaturesViewer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace qtAliceVision
{

/**
* @brief QObject wrapper around a SIOPointFeature.
* @brief QObject wrapper around a PointFeature.
*/
class Feature : public QObject
{
Expand All @@ -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)
{}
Expand All @@ -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;
};


Expand Down

0 comments on commit 9517480

Please sign in to comment.