Skip to content

Commit cd86558

Browse files
authored
Part B of transition to support modernize-use-default-member-init (#5711)
1 parent 5f2125f commit cd86558

38 files changed

+194
-282
lines changed

features/include/pcl/features/3dsc.h

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,7 @@ namespace pcl
9797
theta_divisions_(0),
9898
phi_divisions_(0),
9999
volume_lut_(0),
100-
azimuth_bins_(12),
101-
elevation_bins_(11),
102-
radius_bins_(15),
103-
min_radius_(0.1),
104-
point_density_radius_(0.2),
105-
descriptor_length_ (),
100+
106101
rng_dist_ (0.0f, 1.0f)
107102
{
108103
feature_name_ = "ShapeContext3DEstimation";
@@ -197,22 +192,22 @@ namespace pcl
197192
std::vector<float> volume_lut_;
198193

199194
/** \brief Bins along the azimuth dimension */
200-
std::size_t azimuth_bins_;
195+
std::size_t azimuth_bins_{12};
201196

202197
/** \brief Bins along the elevation dimension */
203-
std::size_t elevation_bins_;
198+
std::size_t elevation_bins_{11};
204199

205200
/** \brief Bins along the radius dimension */
206-
std::size_t radius_bins_;
201+
std::size_t radius_bins_{15};
207202

208203
/** \brief Minimal radius value */
209-
double min_radius_;
204+
double min_radius_{0.1};
210205

211206
/** \brief Point density radius */
212-
double point_density_radius_;
207+
double point_density_radius_{0.2};
213208

214209
/** \brief Descriptor length */
215-
std::size_t descriptor_length_;
210+
std::size_t descriptor_length_{};
216211

217212
/** \brief Random number generator algorithm. */
218213
std::mt19937 rng_;

features/include/pcl/features/board.h

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,7 @@ namespace pcl
6262
using ConstPtr = shared_ptr<const BOARDLocalReferenceFrameEstimation<PointInT, PointNT, PointOutT> >;
6363

6464
/** \brief Constructor. */
65-
BOARDLocalReferenceFrameEstimation () :
66-
tangent_radius_ (0.0f),
67-
find_holes_ (false),
68-
margin_thresh_ (0.85f),
69-
check_margin_array_size_ (24),
70-
hole_size_prob_thresh_ (0.2f),
71-
steep_thresh_ (0.1f)
65+
BOARDLocalReferenceFrameEstimation ()
7266
{
7367
feature_name_ = "BOARDLocalReferenceFrameEstimation";
7468
setCheckMarginArraySize (check_margin_array_size_);
@@ -331,22 +325,22 @@ namespace pcl
331325

332326
private:
333327
/** \brief Radius used to find tangent axis. */
334-
float tangent_radius_;
328+
float tangent_radius_{0.0f};
335329

336330
/** \brief If true, check if support is complete or has missing regions because it is too near to mesh borders. */
337-
bool find_holes_;
331+
bool find_holes_{false};
338332

339333
/** \brief Threshold that define if a support point is near the margins. */
340-
float margin_thresh_;
334+
float margin_thresh_{0.85f};
341335

342336
/** \brief Number of slices that divide the support in order to determine if a missing region is present. */
343-
int check_margin_array_size_;
337+
int check_margin_array_size_{24};
344338

345339
/** \brief Threshold used to determine a missing region */
346-
float hole_size_prob_thresh_;
340+
float hole_size_prob_thresh_{0.2f};
347341

348342
/** \brief Threshold that defines if a missing region contains a point with the most different normal. */
349-
float steep_thresh_;
343+
float steep_thresh_{0.1f};
350344

351345
std::vector<bool> check_margin_array_;
352346
std::vector<float> margin_array_min_angle_;

features/include/pcl/features/crh.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,7 @@ namespace pcl
7474
using PointCloudOut = typename Feature<PointInT, PointOutT>::PointCloudOut;
7575

7676
/** \brief Constructor. */
77-
CRHEstimation () :
78-
vpx_ (0), vpy_ (0), vpz_ (0), nbins_ (90)
77+
CRHEstimation ()
7978
{
8079
k_ = 1;
8180
feature_name_ = "CRHEstimation";
@@ -118,10 +117,10 @@ namespace pcl
118117
/** \brief Values describing the viewpoint ("pinhole" camera model assumed).
119118
* By default, the viewpoint is set to 0,0,0.
120119
*/
121-
float vpx_, vpy_, vpz_;
120+
float vpx_{0}, vpy_{0}, vpz_{0};
122121

123122
/** \brief Number of bins, this should match the Output type */
124-
int nbins_;
123+
int nbins_{90};
125124

126125
/** \brief Centroid to be used */
127126
Eigen::Vector4f centroid_;

features/include/pcl/features/cvfh.h

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,9 @@ namespace pcl
7979

8080
/** \brief Empty constructor. */
8181
CVFHEstimation () :
82-
vpx_ (0), vpy_ (0), vpz_ (0),
83-
leaf_size_ (0.005f),
84-
normalize_bins_ (false),
85-
curv_threshold_ (0.03f),
82+
8683
cluster_tolerance_ (leaf_size_ * 3),
87-
eps_angle_threshold_ (0.125f),
88-
min_points_ (50),
84+
8985
radius_normals_ (leaf_size_ * 3)
9086
{
9187
search_radius_ = 0;
@@ -216,29 +212,29 @@ namespace pcl
216212
/** \brief Values describing the viewpoint ("pinhole" camera model assumed).
217213
* By default, the viewpoint is set to 0,0,0.
218214
*/
219-
float vpx_, vpy_, vpz_;
215+
float vpx_{0}, vpy_{0}, vpz_{0};
220216

221217
/** \brief Size of the voxels after voxel gridding. IMPORTANT: Must match the voxel
222218
* size of the training data or the normalize_bins_ flag must be set to true.
223219
*/
224-
float leaf_size_;
220+
float leaf_size_{0.005f};
225221

226222
/** \brief Whether to normalize the signatures or not. Default: false. */
227-
bool normalize_bins_;
223+
bool normalize_bins_{false};
228224

229225
/** \brief Curvature threshold for removing normals. */
230-
float curv_threshold_;
226+
float curv_threshold_{0.03f};
231227

232228
/** \brief allowed Euclidean distance between points to be added to the cluster. */
233229
float cluster_tolerance_;
234230

235231
/** \brief deviation of the normals between two points so they can be clustered together. */
236-
float eps_angle_threshold_;
232+
float eps_angle_threshold_{0.125f};
237233

238234
/** \brief Minimum amount of points in a clustered region to be considered stable for CVFH
239235
* computation.
240236
*/
241-
std::size_t min_points_;
237+
std::size_t min_points_{50};
242238

243239
/** \brief Radius for the normals computation. */
244240
float radius_normals_;

features/include/pcl/features/flare.h

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,9 @@ namespace pcl
9090
public:
9191
/** \brief Constructor. */
9292
FLARELocalReferenceFrameEstimation () :
93-
tangent_radius_ (0.0f),
94-
margin_thresh_ (0.85f),
95-
min_neighbors_for_normal_axis_ (6),
96-
min_neighbors_for_tangent_axis_ (6),
93+
9794
sampled_surface_ (),
98-
sampled_tree_ (),
99-
fake_sampled_surface_ (false)
95+
sampled_tree_ ()
10096
{
10197
feature_name_ = "FLARELocalReferenceFrameEstimation";
10298
}
@@ -253,16 +249,16 @@ namespace pcl
253249

254250
private:
255251
/** \brief Radius used to find tangent axis. */
256-
float tangent_radius_;
252+
float tangent_radius_{0.0f};
257253

258254
/** \brief Threshold that define if a support point is near the margins. */
259-
float margin_thresh_;
255+
float margin_thresh_{0.85f};
260256

261257
/** \brief Min number of neighbours required for the computation of Z axis. Otherwise, feature point normal is used. */
262-
int min_neighbors_for_normal_axis_;
258+
int min_neighbors_for_normal_axis_{6};
263259

264260
/** \brief Min number of neighbours required for the computation of X axis. Otherwise, a random X axis is set */
265-
int min_neighbors_for_tangent_axis_;
261+
int min_neighbors_for_tangent_axis_{6};
266262

267263
/** \brief An input point cloud describing the surface that is to be used
268264
* for nearest neighbor searches for the estimation of X axis.
@@ -279,7 +275,7 @@ namespace pcl
279275
std::vector<SignedDistanceT> signed_distances_from_highest_points_;
280276

281277
/** \brief If no sampled_surface_ is given, we use surface_ as the sampled surface. */
282-
bool fake_sampled_surface_;
278+
bool fake_sampled_surface_{false};
283279

284280
};
285281

features/include/pcl/features/fpfh.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ namespace pcl
9393

9494
/** \brief Empty constructor. */
9595
FPFHEstimation () :
96-
nr_bins_f1_ (11), nr_bins_f2_ (11), nr_bins_f3_ (11),
96+
9797
d_pi_ (1.0f / (2.0f * static_cast<float> (M_PI)))
9898
{
9999
feature_name_ = "FPFHEstimation";
@@ -197,7 +197,7 @@ namespace pcl
197197
computeFeature (PointCloudOut &output) override;
198198

199199
/** \brief The number of subdivisions for each angular feature interval. */
200-
int nr_bins_f1_, nr_bins_f2_, nr_bins_f3_;
200+
int nr_bins_f1_{11}, nr_bins_f2_{11}, nr_bins_f3_{11};
201201

202202
/** \brief Placeholder for the f1 histogram. */
203203
Eigen::MatrixXf hist_f1_;

features/include/pcl/features/fpfh_omp.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ namespace pcl
9494
/** \brief Initialize the scheduler and set the number of threads to use.
9595
* \param[in] nr_threads the number of hardware threads to use (0 sets the value back to automatic)
9696
*/
97-
FPFHEstimationOMP (unsigned int nr_threads = 0) : nr_bins_f1_ (11), nr_bins_f2_ (11), nr_bins_f3_ (11)
97+
FPFHEstimationOMP (unsigned int nr_threads = 0)
9898
{
9999
feature_name_ = "FPFHEstimationOMP";
100100

@@ -118,7 +118,7 @@ namespace pcl
118118

119119
public:
120120
/** \brief The number of subdivisions for each angular feature interval. */
121-
int nr_bins_f1_, nr_bins_f2_, nr_bins_f3_;
121+
int nr_bins_f1_{11}, nr_bins_f2_{11}, nr_bins_f3_{11};
122122
private:
123123
/** \brief The number of threads the scheduler should use. */
124124
unsigned int threads_;

features/include/pcl/features/gfpfh.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,7 @@ namespace pcl
8282

8383
/** \brief Empty constructor. */
8484
GFPFHEstimation () :
85-
octree_leaf_size_ (0.01),
86-
number_of_classes_ (16),
85+
8786
descriptor_size_ (PointOutT::descriptorSize ())
8887
{
8988
feature_name_ = "GFPFHEstimation";
@@ -162,10 +161,10 @@ namespace pcl
162161

163162
private:
164163
/** \brief Size of octree leaves. */
165-
double octree_leaf_size_;
164+
double octree_leaf_size_{0.01};
166165

167166
/** \brief Number of possible classes/labels. */
168-
std::uint32_t number_of_classes_;
167+
std::uint32_t number_of_classes_{16};
169168

170169
/** \brief Dimension of the descriptors. */
171170
int descriptor_size_;

features/include/pcl/features/impl/moment_of_inertia_estimation.hpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,12 @@
4848
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
4949
template <typename PointT>
5050
pcl::MomentOfInertiaEstimation<PointT>::MomentOfInertiaEstimation () :
51-
is_valid_ (false),
52-
step_ (10.0f),
53-
point_mass_ (0.0001f),
54-
normalize_ (true),
51+
5552
mean_value_ (0.0f, 0.0f, 0.0f),
5653
major_axis_ (0.0f, 0.0f, 0.0f),
5754
middle_axis_ (0.0f, 0.0f, 0.0f),
5855
minor_axis_ (0.0f, 0.0f, 0.0f),
59-
major_value_ (0.0f),
60-
middle_value_ (0.0f),
61-
minor_value_ (0.0f),
56+
6257
aabb_min_point_ (),
6358
aabb_max_point_ (),
6459
obb_min_point_ (),

features/include/pcl/features/impl/multiscale_feature_persistence.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@
4545
//////////////////////////////////////////////////////////////////////////////////////////////
4646
template <typename PointSource, typename PointFeature>
4747
pcl::MultiscaleFeaturePersistence<PointSource, PointFeature>::MultiscaleFeaturePersistence () :
48-
alpha_ (0),
49-
distance_metric_ (L1),
48+
5049
feature_estimator_ (),
5150
features_at_scale_ (),
5251
feature_representation_ ()

0 commit comments

Comments
 (0)