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

Function ignoreClassBits

filters/private/Segmentation.cpp:120–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118}
119
120void ignoreClassBits(PointViewPtr input, PointViewPtr keep,
121 PointViewPtr ignore, PointClasses classbits)
122{
123 using namespace Dimension;
124
125 if (classbits.isNone())
126 {
127 keep->append(*input);
128 }
129 else
130 {
131 for (PointId i = 0; i < input->size(); ++i)
132 {
133 uint8_t c = input->getFieldAs<uint8_t>(Id::Classification, i);
134 if (classbits.bits() & c)
135 ignore->appendPoint(*input, i);
136 else
137 keep->appendPoint(*input, i);
138 }
139 }
140}
141
142void segmentLastReturns(PointViewPtr input, PointViewPtr last,
143 PointViewPtr other)

Callers 1

runMethod · 0.85

Calls 5

isNoneMethod · 0.80
bitsMethod · 0.80
appendPointMethod · 0.80
appendMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected