| 42 | using namespace pdal; |
| 43 | |
| 44 | TEST(OldPCLBlockTests, StatisticalOutliers1) |
| 45 | { |
| 46 | StageFactory f; |
| 47 | |
| 48 | Options ro; |
| 49 | ro.add("filename", Support::datapath("autzen/autzen-point-format-3.las")); |
| 50 | |
| 51 | Stage* r(f.createStage("readers.las")); |
| 52 | EXPECT_TRUE(r); |
| 53 | r->setOptions(ro); |
| 54 | |
| 55 | Options fo; |
| 56 | fo.add("method", "statistical"); |
| 57 | fo.add("multiplier", 1.5); |
| 58 | fo.add("mean_k", 2); |
| 59 | |
| 60 | Stage* outlier(f.createStage("filters.outlier")); |
| 61 | EXPECT_TRUE(outlier); |
| 62 | outlier->setOptions(fo); |
| 63 | outlier->setInput(*r); |
| 64 | |
| 65 | Options rangeOpts; |
| 66 | rangeOpts.add("limits", "Classification![7:7]"); |
| 67 | |
| 68 | Stage* range(f.createStage("filters.range")); |
| 69 | EXPECT_TRUE(range); |
| 70 | range->setOptions(rangeOpts); |
| 71 | range->setInput(*outlier); |
| 72 | |
| 73 | PointTable table; |
| 74 | range->prepare(table); |
| 75 | PointViewSet viewSet = range->execute(table); |
| 76 | |
| 77 | EXPECT_EQ(1u, viewSet.size()); |
| 78 | PointViewPtr view = *viewSet.begin(); |
| 79 | EXPECT_EQ(96u, view->size()); |
| 80 | } |
| 81 | |
| 82 | TEST(OldPCLBlockTests, StatisticalOutliers2) |
| 83 | { |
nothing calls this directly
no test coverage detected