MCPcopy Create free account
hub / github.com/PDAL/PDAL / TEST

Function TEST

test/unit/filters/SkewnessFilterTest.cpp:43–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41using namespace pdal;
42
43TEST(SkewnessTest, t1)
44{
45 StageFactory f;
46
47 Stage *reader(f.createStage("readers.las"));
48
49 Options rOpts;
50 rOpts.add("filename", Support::datapath("las/autzen_trim.las"));
51 reader->setOptions(rOpts);
52
53 Stage* filter(f.createStage("filters.skewnessbalancing"));
54 filter->setInput(*reader);
55
56 PointTable t;
57 filter->prepare(t);
58 PointViewSet s = filter->execute(t);
59
60 EXPECT_EQ(s.size(), 1U);
61 PointViewPtr v = *s.begin();
62
63 size_t ground {0};
64 for (PointId id = 0; id < v->size(); ++id)
65 {
66 uint8_t cl = v->getFieldAs<uint8_t>(Dimension::Id::Classification, id);
67 if (cl == ClassLabel::Ground)
68 ground++;
69 }
70 EXPECT_EQ(ground, 102234u);
71}
72
73TEST(SkewnessTest, t2)
74{

Callers

nothing calls this directly

Calls 11

datapathFunction · 0.85
createStageMethod · 0.80
setOptionsMethod · 0.80
registerDimsMethod · 0.80
filterFunction · 0.50
addMethod · 0.45
prepareMethod · 0.45
executeMethod · 0.45
sizeMethod · 0.45
beginMethod · 0.45
setFieldMethod · 0.45

Tested by

no test coverage detected