Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into issue-3387
Browse files Browse the repository at this point in the history
  • Loading branch information
abellgithub committed May 14, 2021
2 parents 01379e7 + b172d83 commit a91f7a5
Show file tree
Hide file tree
Showing 14 changed files with 142 additions and 880 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
platform: ['ubuntu-latest','windows-latest','macos-latest']

env:
PLATFORM: ${{ matrix.platform }}
PDAL_PLATFORM: ${{ matrix.platform }}

steps:
- uses: actions/checkout@v2
Expand Down
9 changes: 8 additions & 1 deletion filters/FarthestPointSamplingFilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,16 @@ PointViewSet FarthestPointSamplingFilter::run(PointViewPtr inView)
{
// Return empty PointViewSet if the input PointView has no points.
PointViewSet viewSet;
if (!inView->size() || (inView->size() < m_count))
if (!inView->size())
return viewSet;

// Return inView if input PointView has fewer than count points.
if (inView->size() < m_count)
{
viewSet.insert(inView);
return viewSet;
}

PointIdList ids = Segmentation::farthestPointSampling(*inView, m_count);

PointViewPtr outView = inView->makeNew();
Expand Down
7 changes: 4 additions & 3 deletions filters/HeadFilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,17 +81,18 @@ bool HeadFilter::processOne(PointRef& point)

PointViewSet HeadFilter::run(PointViewPtr inView)
{
m_index = 0;

PointViewSet viewSet;
if (!inView->size())
return viewSet;

PointViewPtr outView = inView->makeNew();

for (PointId i = 0; i < inView->size(); ++i)
for (PointRef point : *inView)
{
PointRef point = inView->point(i);
if (processOne(point))
outView->appendPoint(*inView, i);
outView->appendPoint(*inView, point.pointId());
}

viewSet.insert(outView);
Expand Down
2 changes: 1 addition & 1 deletion plugins/teaser/filters/TeaserFilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
#include <Eigen/Dense>

#include <teaser/matcher.h>
#include "registration.h"
#include <teaser/registration.h>

#include <numeric>

Expand Down
10 changes: 10 additions & 0 deletions plugins/teaser/filters/TeaserFilter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,16 @@
namespace pdal
{

// To enable compilation with C++11, we can implement the workaround documented
// at https://stackoverflow.com/a/17903225/1620549 to provide support for
// std::make_unique.
template<typename T, typename... Args>
std::unique_ptr<T> make_unique(Args&&... args)
{
return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
}


class PDAL_DLL TeaserFilter : public Filter
{
public:
Expand Down

0 comments on commit a91f7a5

Please sign in to comment.