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

Method filter

filters/GreedyProjection.cpp:127–1218  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125
126
127void GreedyProjection::filter(PointView& view)
128{
129 NormalFilter nf;
130 nf.setLog(log());
131 nf.doFilter(view);
132
133 KD3Index& tree = view.build3dIndex();
134
135 view_ = &view;
136 mesh_ = view_->createMesh(getName());
137 const double sqr_mu = mu_ * mu_;
138 const double sqr_max_edge = search_radius_*search_radius_;
139
140 nnn_ = (int)(std::min)((point_count_t)nnn_, view.size());
141
142 // Variables to hold the results of nearest neighbor searches
143 PointIdList nnIdx(nnn_);
144 std::vector<double> sqrDists(nnn_);
145
146 // current number of connected components
147 int part_index = 0;
148
149 // 2D coordinates of points
150 const Eigen::Vector2d uvn_nn_qp_zero = Eigen::Vector2d::Zero();
151 Eigen::Vector2d uvn_current;
152 Eigen::Vector2d uvn_prev;
153 Eigen::Vector2d uvn_next;
154
155 // initializing fields
156 already_connected_ = false; // see declaration for comments :P
157
158 // initializing states and fringe neighbors
159 part_.clear();
160 state_.clear();
161 source_.clear();
162 ffn_.clear();
163 sfn_.clear();
164 part_.resize(view.size()); // indices of point's part
165 state_.resize(view.size(), GP3Type::FREE);
166 source_.resize(view.size());
167 ffn_.resize(view.size());
168 sfn_.resize(view.size());
169 fringe_queue_.clear();
170 int fqIdx = 0; // current fringe's index in the queue to be processed
171
172 // Avoiding NaN coordinates if needed
173 /**
174 if (!input_->is_dense)
175 {
176 // Skip invalid points from the indices list
177 for (std::vector<int>::const_iterator it = indices_->begin ();o
178 it != indices_->end (); ++it)
179 if (!pcl_isfinite (input_->points[*it].x) ||
180 !pcl_isfinite (input_->points[*it].y) ||
181 !pcl_isfinite (input_->points[*it].z))
182 state_[*it] = GP3Type::NONE;
183 }
184 **/

Callers

nothing calls this directly

Calls 15

isVisibleFunction · 0.85
stateSetFunction · 0.85
addFringePointFunction · 0.85
findFunction · 0.85
swapFunction · 0.85
createMeshMethod · 0.80
resizeMethod · 0.80
crossMethod · 0.80
dotMethod · 0.80
getNameFunction · 0.70
logFunction · 0.50
setLogMethod · 0.45

Tested by

no test coverage detected