From 897032db2cfd7fc74347cec2024c7bfa2b397b8e Mon Sep 17 00:00:00 2001 From: Ramir Sultanov Date: Sat, 29 Nov 2025 09:15:26 +0300 Subject: [PATCH 1/8] Split `point_types.hpp` part into `field_traits.(h|hpp)` * Move `(H|h)as_` traits from `point_types.hpp` into `field_traits.(h|hpp)` * Add `field_traits.h` include where field traits are used * Change a MSVC compiler warning reset via `#pragma warning((push|pop))` * Add `field_traits.h` include in `point_types.h` for backward compatibility Signed-off-by: Ramir Sultanov --- common/CMakeLists.txt | 2 + .../include/pcl/common/impl/accumulators.hpp | 1 + common/include/pcl/common/impl/copy_point.hpp | 1 + common/include/pcl/common/point_tests.h | 1 + common/include/pcl/field_traits.h | 176 ++++++++++++++++++ common/include/pcl/impl/field_traits.hpp | 129 +++++++++++++ common/include/pcl/impl/point_types.hpp | 172 ----------------- common/include/pcl/point_types.h | 10 + common/include/pcl/point_types_conversion.h | 1 + test/common/test_common.cpp | 1 + test/common/test_type_traits.cpp | 1 + tools/real_sense_viewer.cpp | 1 + .../include/pcl/tracking/particle_filter.h | 1 + 13 files changed, 325 insertions(+), 172 deletions(-) create mode 100644 common/include/pcl/field_traits.h create mode 100644 common/include/pcl/impl/field_traits.hpp diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 0a27abc2956..28a403462c6 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -53,6 +53,7 @@ set(incs include/pcl/correspondence.h include/pcl/memory.h include/pcl/exceptions.h + include/pcl/field_traits.h include/pcl/pcl_base.h include/pcl/pcl_exports.h include/pcl/pcl_macros.h @@ -145,6 +146,7 @@ set(common_incs_impl ) set(impl_incs + include/pcl/impl/field_traits.hpp include/pcl/impl/pcl_base.hpp include/pcl/impl/instantiate.hpp include/pcl/impl/point_types.hpp diff --git a/common/include/pcl/common/impl/accumulators.hpp b/common/include/pcl/common/impl/accumulators.hpp index 513baf77349..55e1d1fe5dd 100644 --- a/common/include/pcl/common/impl/accumulators.hpp +++ b/common/include/pcl/common/impl/accumulators.hpp @@ -46,6 +46,7 @@ #include #include +#include #include #include #include diff --git a/common/include/pcl/common/impl/copy_point.hpp b/common/include/pcl/common/impl/copy_point.hpp index 42843d090e3..19c7452b306 100644 --- a/common/include/pcl/common/impl/copy_point.hpp +++ b/common/include/pcl/common/impl/copy_point.hpp @@ -37,6 +37,7 @@ #pragma once +#include #include #include #include diff --git a/common/include/pcl/common/point_tests.h b/common/include/pcl/common/point_tests.h index dc11edef481..2077dd1bcd5 100644 --- a/common/include/pcl/common/point_tests.h +++ b/common/include/pcl/common/point_tests.h @@ -39,6 +39,7 @@ #pragma once +#include #include #ifdef _MSC_VER diff --git a/common/include/pcl/field_traits.h b/common/include/pcl/field_traits.h new file mode 100644 index 00000000000..70a3ce9de0f --- /dev/null +++ b/common/include/pcl/field_traits.h @@ -0,0 +1,176 @@ +/* + * Software License Agreement (BSD License) + * + * Point Cloud Library (PCL) - www.pointclouds.org + * Copyright (c) 2025-, Open Perception, Inc. + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of the copyright holder(s) nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#include // for std::enable_if + +namespace pcl +{ +namespace traits +{ + +/** \brief Metafunction to check if a given point type has a given field. + * + * Example usage at run-time: + * + * \code + * bool curvature_available = pcl::traits::has_field::value; + * \endcode + * + * Example usage at compile-time: + * + * \code + * BOOST_MPL_ASSERT_MSG ((pcl::traits::has_field::value), + * POINT_TYPE_SHOULD_HAVE_LABEL_FIELD, + * (PointT)); + * \endcode + */ +template +struct has_field; + +/** Metafunction to check if a given point type has all given fields. */ +template +struct has_all_fields; + +/** Metafunction to check if a given point type has any of the given fields. */ +template +struct has_any_field; + +/** \brief Traits defined for ease of use with common fields + * + * has_: struct with `value` datamember defined at compiletime + * has__v: constexpr boolean + * Has: concept modelling name alias for `enable_if` + */ + +/** Metafunction to check if a given point type has x and y fields. */ +template +struct has_xy; + +template +constexpr auto has_xy_v = has_xy::value; + +template +using HasXY = std::enable_if_t, bool>; + +template +using HasNoXY = std::enable_if_t, bool>; + +/** Metafunction to check if a given point type has x, y, and z fields. */ +template +struct has_xyz; + +template +constexpr auto has_xyz_v = has_xyz::value; + +template +using HasXYZ = std::enable_if_t, bool>; + +template +using HasNoXYZ = std::enable_if_t, bool>; + +/** Metafunction to check if a given point type has normal_x, normal_y, and + * normal_z fields. */ +template +struct has_normal; + +template +constexpr auto has_normal_v = has_normal::value; + +template +using HasNormal = std::enable_if_t, bool>; + +template +using HasNoNormal = std::enable_if_t, bool>; + +/** Metafunction to check if a given point type has curvature field. */ +template +struct has_curvature; + +template +constexpr auto has_curvature_v = has_curvature::value; + +template +using HasCurvature = std::enable_if_t, bool>; + +template +using HasNoCurvature = std::enable_if_t, bool>; + +/** Metafunction to check if a given point type has intensity field. */ +template +struct has_intensity; + +template +constexpr auto has_intensity_v = has_intensity::value; + +template +using HasIntensity = std::enable_if_t, bool>; + +template +using HasNoIntensity = std::enable_if_t, bool>; + +/** Metafunction to check if a given point type has either rgb or rgba field. */ +template +struct has_color; + +template +constexpr auto has_color_v = has_color::value; + +template +using HasColor = std::enable_if_t, bool>; + +template +using HasNoColor = std::enable_if_t, bool>; + +/** Metafunction to check if a given point type has label field. */ +template +struct has_label; + +template +constexpr auto has_label_v = has_label::value; + +template +using HasLabel = std::enable_if_t, bool>; + +template +using HasNoLabel = std::enable_if_t, bool>; + +} // namespace traits +} // namespace pcl + +#include diff --git a/common/include/pcl/impl/field_traits.hpp b/common/include/pcl/impl/field_traits.hpp new file mode 100644 index 00000000000..65c3d9aa8b3 --- /dev/null +++ b/common/include/pcl/impl/field_traits.hpp @@ -0,0 +1,129 @@ +/* + * Software License Agreement (BSD License) + * + * Point Cloud Library (PCL) - www.pointclouds.org + * Copyright (c) 2025-, Open Perception, Inc. + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of the copyright holder(s) nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#include // for pcl::traits::fieldList + +// Forward declarations of common pcl field types +namespace pcl +{ +namespace fields +{ +struct x; +struct y; +struct z; +struct normal_x; +struct normal_y; +struct normal_z; +struct curvature; +struct intensity; +struct rgb; +struct rgba; +struct label; +} // namespace fields +} // namespace pcl + +#include // for boost::mpl::and_ +#include // for boost::mpl::bool_ +#include // for boost::mpl::contains +#include // for boost::mpl::fold +#include // for boost::mpl::or_ +#include // for boost::mpl::_1, boost::mpl::_2 +#include // for boost::mpl::vector + +namespace pcl +{ + +namespace traits +{ + +template +struct has_field : boost::mpl::contains::type, Field>::type +{ }; + +template +struct has_all_fields : boost::mpl::fold, + boost::mpl::and_ > >::type +{ }; + +template +struct has_any_field : boost::mpl::fold, + boost::mpl::or_ > >::type +{ }; + +template +struct has_xy : has_all_fields > +{ }; + +template +struct has_xyz : has_all_fields > +{ }; + +template +struct has_normal : has_all_fields > +{ }; + +template +struct has_curvature : has_field +{ }; + +template +struct has_intensity : has_field +{ }; + +template +struct has_color : has_any_field > +{ }; + +template +struct has_label : has_field +{ }; + +} // namespace traits + +} // namespace pcl diff --git a/common/include/pcl/impl/point_types.hpp b/common/include/pcl/impl/point_types.hpp index 88ca63a4d1a..376a412929a 100644 --- a/common/include/pcl/impl/point_types.hpp +++ b/common/include/pcl/impl/point_types.hpp @@ -45,14 +45,6 @@ #include // implementee #include // for POINT_CLOUD_REGISTER_POINT_STRUCT, POINT_CLOUD_REGISTER_POINT_WRAPPER -#include // for boost::mpl::and_ -#include // for boost::mpl::bool_ -#include // for boost::mpl::contains -#include // for boost::mpl::fold -#include // for boost::mpl::or_ -#include // for boost::mpl::_1, boost::mpl::_2 -#include // for boost::mpl::vector - #include // for MatrixMap #include // for copy_n, fill_n @@ -2130,168 +2122,4 @@ struct FieldMatches } }; - -// We're doing a lot of black magic with Boost here, so disable warnings in Maintainer mode, as we will never -// be able to fix them anyway -#if defined _MSC_VER - #pragma warning(disable: 4201) -#endif - -namespace traits -{ - - /** \brief Metafunction to check if a given point type has a given field. - * - * Example usage at run-time: - * - * \code - * bool curvature_available = pcl::traits::has_field::value; - * \endcode - * - * Example usage at compile-time: - * - * \code - * BOOST_MPL_ASSERT_MSG ((pcl::traits::has_field::value), - * POINT_TYPE_SHOULD_HAVE_LABEL_FIELD, - * (PointT)); - * \endcode - */ - template - struct has_field : boost::mpl::contains::type, Field>::type - { }; - - /** Metafunction to check if a given point type has all given fields. */ - template - struct has_all_fields : boost::mpl::fold, - boost::mpl::and_ > >::type - { }; - - /** Metafunction to check if a given point type has any of the given fields. */ - template - struct has_any_field : boost::mpl::fold, - boost::mpl::or_ > >::type - { }; - - /** \brief Traits defined for ease of use with fields already registered before - * - * has_: struct with `value` datamember defined at compiletime - * has__v: constexpr boolean - * Has: concept modelling name alias for `enable_if` - */ - - /** Metafunction to check if a given point type has x and y fields. */ - template - struct has_xy : has_all_fields > - { }; - - template - constexpr auto has_xy_v = has_xy::value; - - template - using HasXY = std::enable_if_t, bool>; - - template - using HasNoXY = std::enable_if_t, bool>; - - /** Metafunction to check if a given point type has x, y, and z fields. */ - template - struct has_xyz : has_all_fields > - { }; - - template - constexpr auto has_xyz_v = has_xyz::value; - - template - using HasXYZ = std::enable_if_t, bool>; - - template - using HasNoXYZ = std::enable_if_t, bool>; - - /** Metafunction to check if a given point type has normal_x, normal_y, and - * normal_z fields. */ - template - struct has_normal : has_all_fields > - { }; - - template - constexpr auto has_normal_v = has_normal::value; - - template - using HasNormal = std::enable_if_t, bool>; - - template - using HasNoNormal = std::enable_if_t, bool>; - - /** Metafunction to check if a given point type has curvature field. */ - template - struct has_curvature : has_field - { }; - - template - constexpr auto has_curvature_v = has_curvature::value; - - template - using HasCurvature = std::enable_if_t, bool>; - - template - using HasNoCurvature = std::enable_if_t, bool>; - - /** Metafunction to check if a given point type has intensity field. */ - template - struct has_intensity : has_field - { }; - - template - constexpr auto has_intensity_v = has_intensity::value; - - template - using HasIntensity = std::enable_if_t, bool>; - - template - using HasNoIntensity = std::enable_if_t, bool>; - - /** Metafunction to check if a given point type has either rgb or rgba field. */ - template - struct has_color : has_any_field > - { }; - - template - constexpr auto has_color_v = has_color::value; - - template - using HasColor = std::enable_if_t, bool>; - - template - using HasNoColor = std::enable_if_t, bool>; - - /** Metafunction to check if a given point type has label field. */ - template - struct has_label : has_field - { }; - - template - constexpr auto has_label_v = has_label::value; - - template - using HasLabel = std::enable_if_t, bool>; - - template - using HasNoLabel = std::enable_if_t, bool>; -} - -#if defined _MSC_VER - #pragma warning(default: 4201) -#endif - } // namespace pcl - diff --git a/common/include/pcl/point_types.h b/common/include/pcl/point_types.h index b1f20e0bd5c..df95b97eaa2 100644 --- a/common/include/pcl/point_types.h +++ b/common/include/pcl/point_types.h @@ -39,6 +39,11 @@ #pragma once +// For backward-compatibility field traits should be imported in this header +#ifndef PCL_OPTIMIZE_IMPORTS_FIELD_TRAITS +#include +#endif + #include @@ -50,6 +55,7 @@ // Allow nameless structs/unions #if defined _MSC_VER + #pragma warning(push) #pragma warning(disable: 4201) #endif @@ -352,3 +358,7 @@ namespace pcl /** @} */ #include + +#if defined _MSC_VER + #pragma warning(pop) +#endif diff --git a/common/include/pcl/point_types_conversion.h b/common/include/pcl/point_types_conversion.h index 23f8e68d860..2230e007840 100644 --- a/common/include/pcl/point_types_conversion.h +++ b/common/include/pcl/point_types_conversion.h @@ -40,6 +40,7 @@ #include +#include #include #include diff --git a/test/common/test_common.cpp b/test/common/test_common.cpp index 5829090bda6..c8ff786a119 100644 --- a/test/common/test_common.cpp +++ b/test/common/test_common.cpp @@ -46,6 +46,7 @@ #include #include #include +#include #include #include #include // for isFinite diff --git a/test/common/test_type_traits.cpp b/test/common/test_type_traits.cpp index 2c0bcd147ed..51c9a9ee3a2 100644 --- a/test/common/test_type_traits.cpp +++ b/test/common/test_type_traits.cpp @@ -37,6 +37,7 @@ #include // for pcl::has_custom_allocator, PCL_MAKE_ALIGNED_OPERATOR_NEW +#include #include #include #include // for pcl::isXYFinite, pcl::isXYZFinite, pcl::isNormalFinite diff --git a/tools/real_sense_viewer.cpp b/tools/real_sense_viewer.cpp index 92450abbc6e..d32170e99e4 100644 --- a/tools/real_sense_viewer.cpp +++ b/tools/real_sense_viewer.cpp @@ -43,6 +43,7 @@ #include #include #include +#include #include diff --git a/tracking/include/pcl/tracking/particle_filter.h b/tracking/include/pcl/tracking/particle_filter.h index 216c27841d9..2e93232933c 100644 --- a/tracking/include/pcl/tracking/particle_filter.h +++ b/tracking/include/pcl/tracking/particle_filter.h @@ -7,6 +7,7 @@ #include #include #include +#include namespace pcl { namespace tracking { From 822507539f86e6f3644dd9d23fcaa524a75d60a0 Mon Sep 17 00:00:00 2001 From: Ramir Sultanov Date: Sat, 29 Nov 2025 09:29:00 +0300 Subject: [PATCH 2/8] Fix changes according to clang-format Signed-off-by: Ramir Sultanov --- tracking/include/pcl/tracking/particle_filter.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tracking/include/pcl/tracking/particle_filter.h b/tracking/include/pcl/tracking/particle_filter.h index 2e93232933c..11879c5ca9f 100644 --- a/tracking/include/pcl/tracking/particle_filter.h +++ b/tracking/include/pcl/tracking/particle_filter.h @@ -5,9 +5,9 @@ #include #include #include +#include #include #include -#include namespace pcl { namespace tracking { From 84b6e73243e95091bed11365e40abcc3d9286188 Mon Sep 17 00:00:00 2001 From: Ramir Sultanov Date: Sat, 29 Nov 2025 09:33:09 +0300 Subject: [PATCH 3/8] Remove blank lines between namespace declarations in `field_traits.hpp` Signed-off-by: Ramir Sultanov --- common/include/pcl/impl/field_traits.hpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/common/include/pcl/impl/field_traits.hpp b/common/include/pcl/impl/field_traits.hpp index 65c3d9aa8b3..e00629e9af4 100644 --- a/common/include/pcl/impl/field_traits.hpp +++ b/common/include/pcl/impl/field_traits.hpp @@ -68,7 +68,6 @@ struct label; namespace pcl { - namespace traits { @@ -125,5 +124,4 @@ struct has_label : has_field { }; } // namespace traits - } // namespace pcl From 1d5b1d4f88db07c22c2b0ed451fe2930a3c9ab91 Mon Sep 17 00:00:00 2001 From: Ramir Sultanov Date: Wed, 3 Dec 2025 13:23:03 +0300 Subject: [PATCH 4/8] Optimize some imports related to `pcl/point_types.h` * Remove unnecessary `pcl/point_types.h` includes in some files * Add missing `pcl/point_types.h` includes in some files Signed-off-by: Ramir Sultanov --- common/include/pcl/common/impl/accumulators.hpp | 1 - common/include/pcl/common/impl/copy_point.hpp | 1 - features/include/pcl/features/boundary.h | 1 + features/include/pcl/features/crh.h | 1 + features/include/pcl/features/esf.h | 1 + features/include/pcl/features/fpfh.h | 1 + features/include/pcl/features/gasd.h | 1 + features/include/pcl/features/impl/rift.hpp | 1 + features/include/pcl/features/our_cvfh.h | 1 + features/include/pcl/features/principal_curvatures.h | 1 + features/include/pcl/features/rsd.h | 1 + filters/include/pcl/filters/impl/filter_indices.hpp | 1 + filters/include/pcl/filters/model_outlier_removal.h | 1 + filters/include/pcl/filters/statistical_outlier_removal.h | 3 ++- keypoints/include/pcl/keypoints/harris_6d.h | 1 + keypoints/include/pcl/keypoints/sift_keypoint.h | 1 + surface/include/pcl/surface/mls.h | 1 + test/common/test_copy_make_borders.cpp | 1 + test/common/test_copy_point.cpp | 1 + test/features/test_cppf_estimation.cpp | 1 + test/features/test_moment_of_inertia_estimation.cpp | 1 + test/filters/test_bilateral.cpp | 1 + test/sample_consensus/test_sample_consensus.cpp | 1 + tools/compute_hull.cpp | 1 + tools/crop_to_hull.cpp | 1 + tools/fast_bilateral_filter.cpp | 1 + tools/gp3_surface.cpp | 1 + tools/marching_cubes_reconstruction.cpp | 1 + tools/pcd_introduce_nan.cpp | 1 + tools/pclzf2pcd.cpp | 1 + tools/plane_projection.cpp | 1 + tools/png2pcd.cpp | 1 + tools/poisson_reconstruction.cpp | 1 + tools/uniform_sampling.cpp | 1 + tools/xyz2pcd.cpp | 1 + tracking/include/pcl/tracking/particle_filter.h | 1 - 36 files changed, 34 insertions(+), 4 deletions(-) diff --git a/common/include/pcl/common/impl/accumulators.hpp b/common/include/pcl/common/impl/accumulators.hpp index 55e1d1fe5dd..129cc3720b6 100644 --- a/common/include/pcl/common/impl/accumulators.hpp +++ b/common/include/pcl/common/impl/accumulators.hpp @@ -49,7 +49,6 @@ #include #include #include -#include namespace pcl { diff --git a/common/include/pcl/common/impl/copy_point.hpp b/common/include/pcl/common/impl/copy_point.hpp index 19c7452b306..d69ceb3829d 100644 --- a/common/include/pcl/common/impl/copy_point.hpp +++ b/common/include/pcl/common/impl/copy_point.hpp @@ -38,7 +38,6 @@ #pragma once #include -#include #include #include #include diff --git a/features/include/pcl/features/boundary.h b/features/include/pcl/features/boundary.h index a56be0abf13..3aa90d5bd9c 100644 --- a/features/include/pcl/features/boundary.h +++ b/features/include/pcl/features/boundary.h @@ -41,6 +41,7 @@ #pragma once #include +#include // for pcl::Vector4fMapConst namespace pcl { diff --git a/features/include/pcl/features/crh.h b/features/include/pcl/features/crh.h index 6a8d072e4c9..e690febf545 100644 --- a/features/include/pcl/features/crh.h +++ b/features/include/pcl/features/crh.h @@ -41,6 +41,7 @@ #pragma once #include +#include // for pcl::Histogram namespace pcl { diff --git a/features/include/pcl/features/esf.h b/features/include/pcl/features/esf.h index 221a9444400..b133318eb50 100644 --- a/features/include/pcl/features/esf.h +++ b/features/include/pcl/features/esf.h @@ -41,6 +41,7 @@ #pragma once #include +#include // for pcl::ESFSignature640 #define GRIDSIZE 64 #define GRIDSIZE_H (GRIDSIZE/2) #include diff --git a/features/include/pcl/features/fpfh.h b/features/include/pcl/features/fpfh.h index ee04bfef7ca..31c7e369a06 100644 --- a/features/include/pcl/features/fpfh.h +++ b/features/include/pcl/features/fpfh.h @@ -41,6 +41,7 @@ #pragma once #include +#include // for pcl::FPFHSignature33 namespace pcl { diff --git a/features/include/pcl/features/gasd.h b/features/include/pcl/features/gasd.h index b0c912a8b67..c3bda5444cc 100644 --- a/features/include/pcl/features/gasd.h +++ b/features/include/pcl/features/gasd.h @@ -39,6 +39,7 @@ #pragma once #include +#include // for GASDSignature512, GASDSignature984 namespace pcl { diff --git a/features/include/pcl/features/impl/rift.hpp b/features/include/pcl/features/impl/rift.hpp index c79c6fcd8b9..94749782656 100644 --- a/features/include/pcl/features/impl/rift.hpp +++ b/features/include/pcl/features/impl/rift.hpp @@ -42,6 +42,7 @@ #define PCL_FEATURES_IMPL_RIFT_H_ #include +#include // for pcl::Vector3fMapConst ////////////////////////////////////////////////////////////////////////////////////////////// template void diff --git a/features/include/pcl/features/our_cvfh.h b/features/include/pcl/features/our_cvfh.h index fda1ec99970..61b28ef589f 100644 --- a/features/include/pcl/features/our_cvfh.h +++ b/features/include/pcl/features/our_cvfh.h @@ -41,6 +41,7 @@ #pragma once #include +#include // for pcl::VFHSignature308, pcl::PointNormal namespace pcl { diff --git a/features/include/pcl/features/principal_curvatures.h b/features/include/pcl/features/principal_curvatures.h index f7285a113ce..c828e5ec759 100644 --- a/features/include/pcl/features/principal_curvatures.h +++ b/features/include/pcl/features/principal_curvatures.h @@ -41,6 +41,7 @@ #pragma once #include +#include // for pcl::PrincipalCurvatures namespace pcl { diff --git a/features/include/pcl/features/rsd.h b/features/include/pcl/features/rsd.h index 0265277b864..71c1158fb9b 100644 --- a/features/include/pcl/features/rsd.h +++ b/features/include/pcl/features/rsd.h @@ -43,6 +43,7 @@ #include #include #include +#include // for Histogram namespace pcl { diff --git a/filters/include/pcl/filters/impl/filter_indices.hpp b/filters/include/pcl/filters/impl/filter_indices.hpp index de53d91c781..c7048592564 100644 --- a/filters/include/pcl/filters/impl/filter_indices.hpp +++ b/filters/include/pcl/filters/impl/filter_indices.hpp @@ -39,6 +39,7 @@ #define PCL_FILTERS_IMPL_FILTER_INDICES_H_ #include +#include // for PointXYZ template void pcl::removeNaNFromPointCloud (const pcl::PointCloud &cloud_in, diff --git a/filters/include/pcl/filters/model_outlier_removal.h b/filters/include/pcl/filters/model_outlier_removal.h index bc811290191..9546becfecd 100644 --- a/filters/include/pcl/filters/model_outlier_removal.h +++ b/filters/include/pcl/filters/model_outlier_removal.h @@ -39,6 +39,7 @@ #include #include +#include // for pcl::Normal // Sample Consensus models #include diff --git a/filters/include/pcl/filters/statistical_outlier_removal.h b/filters/include/pcl/filters/statistical_outlier_removal.h index defa36bf368..5bbd2c15274 100644 --- a/filters/include/pcl/filters/statistical_outlier_removal.h +++ b/filters/include/pcl/filters/statistical_outlier_removal.h @@ -40,7 +40,8 @@ #pragma once #include -#include // for Search +#include // for pcl::PointXYZ +#include // for Search namespace pcl { diff --git a/keypoints/include/pcl/keypoints/harris_6d.h b/keypoints/include/pcl/keypoints/harris_6d.h index 8b3b3ad880b..a5f631bad9a 100644 --- a/keypoints/include/pcl/keypoints/harris_6d.h +++ b/keypoints/include/pcl/keypoints/harris_6d.h @@ -37,6 +37,7 @@ #pragma once #include +#include // for pcl::Normal, pcl::IntensityGradient namespace pcl { diff --git a/keypoints/include/pcl/keypoints/sift_keypoint.h b/keypoints/include/pcl/keypoints/sift_keypoint.h index 5077096343f..9c7ab35b946 100644 --- a/keypoints/include/pcl/keypoints/sift_keypoint.h +++ b/keypoints/include/pcl/keypoints/sift_keypoint.h @@ -36,6 +36,7 @@ #pragma once #include +#include // for PointNormal, PointXYZRGB, PointXYZRGBA namespace pcl { diff --git a/surface/include/pcl/surface/mls.h b/surface/include/pcl/surface/mls.h index 7c33feddfff..261024d39af 100644 --- a/surface/include/pcl/surface/mls.h +++ b/surface/include/pcl/surface/mls.h @@ -49,6 +49,7 @@ #include #include #include // for Search +#include // for pcl::Normal #include diff --git a/test/common/test_copy_make_borders.cpp b/test/common/test_copy_make_borders.cpp index 2f8963f75f1..1c47b23fee7 100644 --- a/test/common/test_copy_make_borders.cpp +++ b/test/common/test_copy_make_borders.cpp @@ -37,6 +37,7 @@ #include #include #include +#include #include using namespace pcl; diff --git a/test/common/test_copy_point.cpp b/test/common/test_copy_point.cpp index efcc9d5b02f..54ed23fa5f8 100644 --- a/test/common/test_copy_point.cpp +++ b/test/common/test_copy_point.cpp @@ -36,6 +36,7 @@ #include #include +#include TEST (CopyPointTest, SameTypeWithoutColor) { diff --git a/test/features/test_cppf_estimation.cpp b/test/features/test_cppf_estimation.cpp index fc57644a57a..69effd09576 100755 --- a/test/features/test_cppf_estimation.cpp +++ b/test/features/test_cppf_estimation.cpp @@ -39,6 +39,7 @@ #include #include +#include #include #include diff --git a/test/features/test_moment_of_inertia_estimation.cpp b/test/features/test_moment_of_inertia_estimation.cpp index c471b5cf993..19bed41c65e 100644 --- a/test/features/test_moment_of_inertia_estimation.cpp +++ b/test/features/test_moment_of_inertia_estimation.cpp @@ -39,6 +39,7 @@ #include #include +#include #include #include diff --git a/test/filters/test_bilateral.cpp b/test/filters/test_bilateral.cpp index cedb2160558..1bfaff58a0e 100644 --- a/test/filters/test_bilateral.cpp +++ b/test/filters/test_bilateral.cpp @@ -39,6 +39,7 @@ */ #include +#include #include #include #include diff --git a/test/sample_consensus/test_sample_consensus.cpp b/test/sample_consensus/test_sample_consensus.cpp index 6580283faae..faf33cc8e97 100644 --- a/test/sample_consensus/test_sample_consensus.cpp +++ b/test/sample_consensus/test_sample_consensus.cpp @@ -38,6 +38,7 @@ #include +#include #include #include #include diff --git a/tools/compute_hull.cpp b/tools/compute_hull.cpp index f15b5114530..59a4504af1c 100644 --- a/tools/compute_hull.cpp +++ b/tools/compute_hull.cpp @@ -37,6 +37,7 @@ * */ +#include #include #include #include diff --git a/tools/crop_to_hull.cpp b/tools/crop_to_hull.cpp index 58efaed03ab..78c61a9d1da 100644 --- a/tools/crop_to_hull.cpp +++ b/tools/crop_to_hull.cpp @@ -38,6 +38,7 @@ */ #include +#include #include #include #include diff --git a/tools/fast_bilateral_filter.cpp b/tools/fast_bilateral_filter.cpp index 09a653fad7f..6863e079922 100644 --- a/tools/fast_bilateral_filter.cpp +++ b/tools/fast_bilateral_filter.cpp @@ -36,6 +36,7 @@ */ #include +#include #include #include #include diff --git a/tools/gp3_surface.cpp b/tools/gp3_surface.cpp index d280bc12e4d..5cfddedd234 100644 --- a/tools/gp3_surface.cpp +++ b/tools/gp3_surface.cpp @@ -37,6 +37,7 @@ * */ +#include #include #include #include diff --git a/tools/marching_cubes_reconstruction.cpp b/tools/marching_cubes_reconstruction.cpp index b438e5a767e..5d21a15be8b 100644 --- a/tools/marching_cubes_reconstruction.cpp +++ b/tools/marching_cubes_reconstruction.cpp @@ -36,6 +36,7 @@ */ #include +#include #include #include #include diff --git a/tools/pcd_introduce_nan.cpp b/tools/pcd_introduce_nan.cpp index c7c517be157..550e6b5480d 100644 --- a/tools/pcd_introduce_nan.cpp +++ b/tools/pcd_introduce_nan.cpp @@ -35,6 +35,7 @@ * */ +#include #include #include // for lexical_cast diff --git a/tools/pclzf2pcd.cpp b/tools/pclzf2pcd.cpp index c29dabe7641..5654970462f 100644 --- a/tools/pclzf2pcd.cpp +++ b/tools/pclzf2pcd.cpp @@ -35,6 +35,7 @@ * */ +#include #include #include #include diff --git a/tools/plane_projection.cpp b/tools/plane_projection.cpp index d0aff5281ff..8606aa109b1 100644 --- a/tools/plane_projection.cpp +++ b/tools/plane_projection.cpp @@ -38,6 +38,7 @@ */ #include +#include #include #include #include diff --git a/tools/png2pcd.cpp b/tools/png2pcd.cpp index ac5bbe4b744..b287ce2adec 100644 --- a/tools/png2pcd.cpp +++ b/tools/png2pcd.cpp @@ -47,6 +47,7 @@ * */ +#include #include #include #include diff --git a/tools/poisson_reconstruction.cpp b/tools/poisson_reconstruction.cpp index 40c010dadaa..dd52768d19b 100644 --- a/tools/poisson_reconstruction.cpp +++ b/tools/poisson_reconstruction.cpp @@ -39,6 +39,7 @@ */ #include +#include #include #include #include diff --git a/tools/uniform_sampling.cpp b/tools/uniform_sampling.cpp index fef5cfd5105..46e31f0b0ab 100644 --- a/tools/uniform_sampling.cpp +++ b/tools/uniform_sampling.cpp @@ -36,6 +36,7 @@ */ #include +#include #include #include #include diff --git a/tools/xyz2pcd.cpp b/tools/xyz2pcd.cpp index 2a2cd74e7cd..5bff2e30a27 100644 --- a/tools/xyz2pcd.cpp +++ b/tools/xyz2pcd.cpp @@ -35,6 +35,7 @@ * */ +#include #include #include #include diff --git a/tracking/include/pcl/tracking/particle_filter.h b/tracking/include/pcl/tracking/particle_filter.h index 11879c5ca9f..fb399ae4129 100644 --- a/tracking/include/pcl/tracking/particle_filter.h +++ b/tracking/include/pcl/tracking/particle_filter.h @@ -7,7 +7,6 @@ #include #include #include -#include namespace pcl { namespace tracking { From cca409830df386ea3ee71b8f1c5501db3b05d29d Mon Sep 17 00:00:00 2001 From: Ramir Sultanov Date: Wed, 3 Dec 2025 17:04:40 +0300 Subject: [PATCH 5/8] Change license description in `pcl/field_traits.(h|hpp)` * Change license description in `pcl/field_traits.(h|hpp)` Signed-off-by: Ramir Sultanov --- common/include/pcl/field_traits.h | 42 ++++-------------------- common/include/pcl/impl/field_traits.hpp | 42 ++++-------------------- 2 files changed, 14 insertions(+), 70 deletions(-) diff --git a/common/include/pcl/field_traits.h b/common/include/pcl/field_traits.h index 70a3ce9de0f..d3fce4f245d 100644 --- a/common/include/pcl/field_traits.h +++ b/common/include/pcl/field_traits.h @@ -1,39 +1,11 @@ /* - * Software License Agreement (BSD License) - * - * Point Cloud Library (PCL) - www.pointclouds.org - * Copyright (c) 2025-, Open Perception, Inc. - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of the copyright holder(s) nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - */ +* SPDX-License-Identifier: BSD-3-Clause +* +* Point Cloud Library (PCL) - www.pointclouds.org +* Copyright (c) 2025-, Open Perception Inc. +* +* All rights reserved +*/ #pragma once diff --git a/common/include/pcl/impl/field_traits.hpp b/common/include/pcl/impl/field_traits.hpp index e00629e9af4..a746361e8e4 100644 --- a/common/include/pcl/impl/field_traits.hpp +++ b/common/include/pcl/impl/field_traits.hpp @@ -1,39 +1,11 @@ /* - * Software License Agreement (BSD License) - * - * Point Cloud Library (PCL) - www.pointclouds.org - * Copyright (c) 2025-, Open Perception, Inc. - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of the copyright holder(s) nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - */ +* SPDX-License-Identifier: BSD-3-Clause +* +* Point Cloud Library (PCL) - www.pointclouds.org +* Copyright (c) 2025-, Open Perception Inc. +* +* All rights reserved +*/ #pragma once From 90bb25bb3d88e4270bf021a945147be95af1628b Mon Sep 17 00:00:00 2001 From: Ramir Sultanov Date: Wed, 3 Dec 2025 17:43:59 +0300 Subject: [PATCH 6/8] Add missing `pcl/point_types.h` includes in `examples` * Add missing `pcl/point_types.h` includes in `examples` Signed-off-by: Ramir Sultanov --- examples/common/example_check_if_point_is_valid.cpp | 2 +- examples/common/example_copy_point_cloud.cpp | 1 + examples/common/example_get_max_min_coordinates.cpp | 1 + examples/features/example_difference_of_normals.cpp | 1 + examples/features/example_fast_point_feature_histograms.cpp | 1 + examples/features/example_normal_estimation.cpp | 1 + examples/features/example_point_feature_histograms.cpp | 1 + examples/features/example_principal_curvatures_estimation.cpp | 1 + examples/features/example_rift_estimation.cpp | 1 + examples/features/example_shape_contexts.cpp | 1 + examples/features/example_spin_images.cpp | 1 + examples/filters/example_extract_indices.cpp | 1 + examples/filters/example_remove_nan_from_point_cloud.cpp | 1 + examples/keypoints/example_get_keypoints_indices.cpp | 1 + examples/keypoints/example_sift_keypoint_estimation.cpp | 1 + examples/keypoints/example_sift_normal_keypoint_estimation.cpp | 1 + examples/keypoints/example_sift_z_keypoint_estimation.cpp | 1 + examples/outofcore/example_outofcore.cpp | 1 + examples/outofcore/example_outofcore_with_lod.cpp | 1 + examples/segmentation/example_cpc_segmentation.cpp | 1 + examples/segmentation/example_extract_clusters_normals.cpp | 1 + examples/segmentation/example_lccp_segmentation.cpp | 1 + examples/segmentation/example_region_growing.cpp | 1 + examples/segmentation/example_supervoxels.cpp | 1 + examples/stereo/example_stereo_baseline.cpp | 1 + examples/surface/example_nurbs_fitting_closed_curve.cpp | 2 ++ examples/surface/example_nurbs_fitting_closed_curve3d.cpp | 2 ++ examples/surface/example_nurbs_fitting_curve2d.cpp | 2 ++ examples/surface/example_nurbs_fitting_surface.cpp | 1 + examples/surface/example_nurbs_viewer_surface.cpp | 1 + examples/surface/test_nurbs_fitting_surface.cpp | 1 + 31 files changed, 34 insertions(+), 1 deletion(-) diff --git a/examples/common/example_check_if_point_is_valid.cpp b/examples/common/example_check_if_point_is_valid.cpp index ab42690b419..3cb7d0d8ffc 100644 --- a/examples/common/example_check_if_point_is_valid.cpp +++ b/examples/common/example_check_if_point_is_valid.cpp @@ -37,8 +37,8 @@ * */ -#include #include // for pcl::isFinite +#include int main () diff --git a/examples/common/example_copy_point_cloud.cpp b/examples/common/example_copy_point_cloud.cpp index d76ff6f642d..f927390b359 100644 --- a/examples/common/example_copy_point_cloud.cpp +++ b/examples/common/example_copy_point_cloud.cpp @@ -46,6 +46,7 @@ #include #include +#include static void sameType (); diff --git a/examples/common/example_get_max_min_coordinates.cpp b/examples/common/example_get_max_min_coordinates.cpp index f097a24a366..ab71e7cda10 100644 --- a/examples/common/example_get_max_min_coordinates.cpp +++ b/examples/common/example_get_max_min_coordinates.cpp @@ -1,6 +1,7 @@ #include #include #include +#include int main (int, char**) diff --git a/examples/features/example_difference_of_normals.cpp b/examples/features/example_difference_of_normals.cpp index e8a13301f90..ecb3d168046 100644 --- a/examples/features/example_difference_of_normals.cpp +++ b/examples/features/example_difference_of_normals.cpp @@ -14,6 +14,7 @@ #include #include #include // for OrganizedNeighbor +#include #include diff --git a/examples/features/example_fast_point_feature_histograms.cpp b/examples/features/example_fast_point_feature_histograms.cpp index 4b16d1b3ac0..8a8e4521019 100644 --- a/examples/features/example_fast_point_feature_histograms.cpp +++ b/examples/features/example_fast_point_feature_histograms.cpp @@ -43,6 +43,7 @@ #include #include #include // for KdTree +#include int main (int argc, char** argv) diff --git a/examples/features/example_normal_estimation.cpp b/examples/features/example_normal_estimation.cpp index 80efba1eba6..3d87d71e0e5 100644 --- a/examples/features/example_normal_estimation.cpp +++ b/examples/features/example_normal_estimation.cpp @@ -41,6 +41,7 @@ #include #include +#include int main (int, char** argv) diff --git a/examples/features/example_point_feature_histograms.cpp b/examples/features/example_point_feature_histograms.cpp index 77d9d2c0427..28343100431 100644 --- a/examples/features/example_point_feature_histograms.cpp +++ b/examples/features/example_point_feature_histograms.cpp @@ -43,6 +43,7 @@ #include #include #include // for KdTree +#include int main (int, char** argv) diff --git a/examples/features/example_principal_curvatures_estimation.cpp b/examples/features/example_principal_curvatures_estimation.cpp index b01e860d1f6..2eea3fa58d4 100644 --- a/examples/features/example_principal_curvatures_estimation.cpp +++ b/examples/features/example_principal_curvatures_estimation.cpp @@ -43,6 +43,7 @@ #include #include #include // for KdTree +#include int main (int, char** argv) diff --git a/examples/features/example_rift_estimation.cpp b/examples/features/example_rift_estimation.cpp index 9faf87dff91..c281332d03e 100644 --- a/examples/features/example_rift_estimation.cpp +++ b/examples/features/example_rift_estimation.cpp @@ -45,6 +45,7 @@ #include #include #include // for KdTree +#include int main (int, char** argv) diff --git a/examples/features/example_shape_contexts.cpp b/examples/features/example_shape_contexts.cpp index f294edf8f67..80032b1c7a2 100644 --- a/examples/features/example_shape_contexts.cpp +++ b/examples/features/example_shape_contexts.cpp @@ -43,6 +43,7 @@ #include #include #include // for KdTree +#include int main (int, char** argv) diff --git a/examples/features/example_spin_images.cpp b/examples/features/example_spin_images.cpp index 7305ceec8cd..eea98e82706 100644 --- a/examples/features/example_spin_images.cpp +++ b/examples/features/example_spin_images.cpp @@ -43,6 +43,7 @@ #include #include #include // for KdTree +#include int main (int, char** argv) diff --git a/examples/filters/example_extract_indices.cpp b/examples/filters/example_extract_indices.cpp index 73f18f280e9..523cc78521a 100644 --- a/examples/filters/example_extract_indices.cpp +++ b/examples/filters/example_extract_indices.cpp @@ -40,6 +40,7 @@ #include #include +#include int main (int, char**) diff --git a/examples/filters/example_remove_nan_from_point_cloud.cpp b/examples/filters/example_remove_nan_from_point_cloud.cpp index 5fc2d45ceae..0e3f50d6da5 100644 --- a/examples/filters/example_remove_nan_from_point_cloud.cpp +++ b/examples/filters/example_remove_nan_from_point_cloud.cpp @@ -40,6 +40,7 @@ #include #include +#include int main (int, char**) diff --git a/examples/keypoints/example_get_keypoints_indices.cpp b/examples/keypoints/example_get_keypoints_indices.cpp index ff26342b30b..d1597017f93 100644 --- a/examples/keypoints/example_get_keypoints_indices.cpp +++ b/examples/keypoints/example_get_keypoints_indices.cpp @@ -38,6 +38,7 @@ #include // for StopWatch #include #include +#include int main(int argc, char** argv) diff --git a/examples/keypoints/example_sift_keypoint_estimation.cpp b/examples/keypoints/example_sift_keypoint_estimation.cpp index 34748942bdc..4cdfd8aa82e 100644 --- a/examples/keypoints/example_sift_keypoint_estimation.cpp +++ b/examples/keypoints/example_sift_keypoint_estimation.cpp @@ -42,6 +42,7 @@ #include #include +#include int main(int, char** argv) diff --git a/examples/keypoints/example_sift_normal_keypoint_estimation.cpp b/examples/keypoints/example_sift_normal_keypoint_estimation.cpp index 447ad4251d3..3158d37bd71 100644 --- a/examples/keypoints/example_sift_normal_keypoint_estimation.cpp +++ b/examples/keypoints/example_sift_normal_keypoint_estimation.cpp @@ -43,6 +43,7 @@ #include #include #include +#include /* This example shows how to estimate the SIFT points based on the * Normal gradients i.e. curvature than using the Intensity gradient diff --git a/examples/keypoints/example_sift_z_keypoint_estimation.cpp b/examples/keypoints/example_sift_z_keypoint_estimation.cpp index 036a8a6b39f..c039dbe3fc5 100644 --- a/examples/keypoints/example_sift_z_keypoint_estimation.cpp +++ b/examples/keypoints/example_sift_z_keypoint_estimation.cpp @@ -42,6 +42,7 @@ #include #include +#include /* This examples shows how to estimate the SIFT points based on the * z gradient of the 3D points than using the Intensity gradient as diff --git a/examples/outofcore/example_outofcore.cpp b/examples/outofcore/example_outofcore.cpp index 0e72dec2be2..f2a38798217 100644 --- a/examples/outofcore/example_outofcore.cpp +++ b/examples/outofcore/example_outofcore.cpp @@ -40,6 +40,7 @@ #include #include +#include using namespace pcl::outofcore; diff --git a/examples/outofcore/example_outofcore_with_lod.cpp b/examples/outofcore/example_outofcore_with_lod.cpp index 6906fe0d018..ea8f2a95f66 100644 --- a/examples/outofcore/example_outofcore_with_lod.cpp +++ b/examples/outofcore/example_outofcore_with_lod.cpp @@ -40,6 +40,7 @@ #include #include +#include using namespace pcl::outofcore; diff --git a/examples/segmentation/example_cpc_segmentation.cpp b/examples/segmentation/example_cpc_segmentation.cpp index c65e2c3a9c5..21391dc7d55 100644 --- a/examples/segmentation/example_cpc_segmentation.cpp +++ b/examples/segmentation/example_cpc_segmentation.cpp @@ -42,6 +42,7 @@ #include #include #include +#include #include diff --git a/examples/segmentation/example_extract_clusters_normals.cpp b/examples/segmentation/example_extract_clusters_normals.cpp index a4fec273ce1..293bcd0b00d 100644 --- a/examples/segmentation/example_extract_clusters_normals.cpp +++ b/examples/segmentation/example_extract_clusters_normals.cpp @@ -43,6 +43,7 @@ #include #include #include +#include int main (int argc, char **argv) diff --git a/examples/segmentation/example_lccp_segmentation.cpp b/examples/segmentation/example_lccp_segmentation.cpp index e7e7df35695..b8e1f4602e2 100644 --- a/examples/segmentation/example_lccp_segmentation.cpp +++ b/examples/segmentation/example_lccp_segmentation.cpp @@ -42,6 +42,7 @@ #include #include #include +#include #include diff --git a/examples/segmentation/example_region_growing.cpp b/examples/segmentation/example_region_growing.cpp index 4a13f4e66d5..2837efc30b2 100644 --- a/examples/segmentation/example_region_growing.cpp +++ b/examples/segmentation/example_region_growing.cpp @@ -46,6 +46,7 @@ #include #include #include // for KdTree +#include int main (int argc, char** av) diff --git a/examples/segmentation/example_supervoxels.cpp b/examples/segmentation/example_supervoxels.cpp index 536c8d08672..be201a6a388 100644 --- a/examples/segmentation/example_supervoxels.cpp +++ b/examples/segmentation/example_supervoxels.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include #include diff --git a/examples/stereo/example_stereo_baseline.cpp b/examples/stereo/example_stereo_baseline.cpp index 594ab2465cf..a78b436d792 100644 --- a/examples/stereo/example_stereo_baseline.cpp +++ b/examples/stereo/example_stereo_baseline.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include diff --git a/examples/surface/example_nurbs_fitting_closed_curve.cpp b/examples/surface/example_nurbs_fitting_closed_curve.cpp index 65342497a35..38aaefdffad 100644 --- a/examples/surface/example_nurbs_fitting_closed_curve.cpp +++ b/examples/surface/example_nurbs_fitting_closed_curve.cpp @@ -5,6 +5,8 @@ #include +#include + #include pcl::visualization::PCLVisualizer viewer ("Curve Fitting PDM (red), SDM (green), TDM (blue)"); diff --git a/examples/surface/example_nurbs_fitting_closed_curve3d.cpp b/examples/surface/example_nurbs_fitting_closed_curve3d.cpp index c6da7235fac..e3dc28f0824 100644 --- a/examples/surface/example_nurbs_fitting_closed_curve3d.cpp +++ b/examples/surface/example_nurbs_fitting_closed_curve3d.cpp @@ -3,6 +3,8 @@ #include +#include + #include pcl::visualization::PCLVisualizer viewer ("Curve Fitting 3D"); diff --git a/examples/surface/example_nurbs_fitting_curve2d.cpp b/examples/surface/example_nurbs_fitting_curve2d.cpp index f66b050cfdd..a988a18789c 100644 --- a/examples/surface/example_nurbs_fitting_curve2d.cpp +++ b/examples/surface/example_nurbs_fitting_curve2d.cpp @@ -3,6 +3,8 @@ #include +#include + #include pcl::visualization::PCLVisualizer viewer ("Curve Fitting 2D"); diff --git a/examples/surface/example_nurbs_fitting_surface.cpp b/examples/surface/example_nurbs_fitting_surface.cpp index 0cbda86ac80..8bba2d30641 100644 --- a/examples/surface/example_nurbs_fitting_surface.cpp +++ b/examples/surface/example_nurbs_fitting_surface.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include diff --git a/examples/surface/example_nurbs_viewer_surface.cpp b/examples/surface/example_nurbs_viewer_surface.cpp index d77d7f02075..124c0794ad9 100644 --- a/examples/surface/example_nurbs_viewer_surface.cpp +++ b/examples/surface/example_nurbs_viewer_surface.cpp @@ -1,3 +1,4 @@ +#include #include #include diff --git a/examples/surface/test_nurbs_fitting_surface.cpp b/examples/surface/test_nurbs_fitting_surface.cpp index 74a52083587..1a9f41057f3 100644 --- a/examples/surface/test_nurbs_fitting_surface.cpp +++ b/examples/surface/test_nurbs_fitting_surface.cpp @@ -1,4 +1,5 @@ #include +#include #include #include From 70240a750a086fe82b06d33927bcb19c1381dc45 Mon Sep 17 00:00:00 2001 From: Ramir Sultanov Date: Thu, 4 Dec 2025 17:01:04 +0300 Subject: [PATCH 7/8] Add missing `pcl/point_types.h` includes in some files * Add missing `pcl/point_types.h` includes in some files Signed-off-by: Ramir Sultanov --- ...atistical_multiscale_interest_region_extraction_example.cpp | 1 + benchmarks/filters/voxel_grid.cpp | 3 ++- filters/include/pcl/filters/radius_outlier_removal.h | 3 ++- io/include/pcl/io/pcd_grabber.h | 1 + keypoints/include/pcl/keypoints/harris_3d.h | 1 + outofcore/include/pcl/outofcore/octree_base_node.h | 1 + outofcore/include/pcl/outofcore/octree_disk_container.h | 3 ++- tools/image_grabber_saver.cpp | 1 + 8 files changed, 11 insertions(+), 3 deletions(-) diff --git a/apps/src/statistical_multiscale_interest_region_extraction_example.cpp b/apps/src/statistical_multiscale_interest_region_extraction_example.cpp index b966c39a29f..8fd71dec19e 100644 --- a/apps/src/statistical_multiscale_interest_region_extraction_example.cpp +++ b/apps/src/statistical_multiscale_interest_region_extraction_example.cpp @@ -39,6 +39,7 @@ #include #include #include +#include using namespace pcl; diff --git a/benchmarks/filters/voxel_grid.cpp b/benchmarks/filters/voxel_grid.cpp index 066cacc6980..c37986928f7 100644 --- a/benchmarks/filters/voxel_grid.cpp +++ b/benchmarks/filters/voxel_grid.cpp @@ -1,6 +1,7 @@ #include #include -#include // for PCDReader +#include // for PCDReader +#include // for pcl::PointXYZ #include diff --git a/filters/include/pcl/filters/radius_outlier_removal.h b/filters/include/pcl/filters/radius_outlier_removal.h index ac518e47eef..06613984a06 100644 --- a/filters/include/pcl/filters/radius_outlier_removal.h +++ b/filters/include/pcl/filters/radius_outlier_removal.h @@ -40,7 +40,8 @@ #pragma once #include -#include // for Search, Search<>::Ptr +#include // for Search, Search<>::Ptr +#include // for pcl::PointXYZ namespace pcl { diff --git a/io/include/pcl/io/pcd_grabber.h b/io/include/pcl/io/pcd_grabber.h index be10528d113..7f8d9149601 100644 --- a/io/include/pcl/io/pcd_grabber.h +++ b/io/include/pcl/io/pcd_grabber.h @@ -50,6 +50,7 @@ #include #include #include +#include // for pcl::RGB #endif #include diff --git a/keypoints/include/pcl/keypoints/harris_3d.h b/keypoints/include/pcl/keypoints/harris_3d.h index 9ba689a0b57..5908dd337c3 100644 --- a/keypoints/include/pcl/keypoints/harris_3d.h +++ b/keypoints/include/pcl/keypoints/harris_3d.h @@ -38,6 +38,7 @@ #pragma once #include +#include // for pcl::Normal namespace pcl { diff --git a/outofcore/include/pcl/outofcore/octree_base_node.h b/outofcore/include/pcl/outofcore/octree_base_node.h index b6cffe19b51..6d1b92c6a51 100644 --- a/outofcore/include/pcl/outofcore/octree_base_node.h +++ b/outofcore/include/pcl/outofcore/octree_base_node.h @@ -46,6 +46,7 @@ #include #include +#include // for pcl::PointXYZ #include #include diff --git a/outofcore/include/pcl/outofcore/octree_disk_container.h b/outofcore/include/pcl/outofcore/octree_disk_container.h index 9ca3d5d99e0..566470373d2 100644 --- a/outofcore/include/pcl/outofcore/octree_disk_container.h +++ b/outofcore/include/pcl/outofcore/octree_disk_container.h @@ -47,10 +47,11 @@ #include // for boost::mt19937 #include -#include // pcl::utils::ignore #include +#include // pcl::utils::ignore #include #include +#include // for pcl::PointXYZ //allows operation on POSIX #if !defined _WIN32 diff --git a/tools/image_grabber_saver.cpp b/tools/image_grabber_saver.cpp index 8f89a8765dc..8e98717c7f1 100644 --- a/tools/image_grabber_saver.cpp +++ b/tools/image_grabber_saver.cpp @@ -41,6 +41,7 @@ #include #include #include +#include using pcl::console::print_error; using pcl::console::print_info; From d2199ca1dfd832d7a8662a9c0cb580d0648b4efc Mon Sep 17 00:00:00 2001 From: Ramir Sultanov Date: Thu, 4 Dec 2025 17:23:05 +0300 Subject: [PATCH 8/8] Add missing `cstring` include in `pcl/common/impl/copy_point.hpp` Add missing `cstring` include in `common/include/pcl/common/impl/copy_point.hpp` Signed-off-by: Ramir Sultanov --- common/include/pcl/common/impl/copy_point.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/common/include/pcl/common/impl/copy_point.hpp b/common/include/pcl/common/impl/copy_point.hpp index d69ceb3829d..aabee3be6b5 100644 --- a/common/include/pcl/common/impl/copy_point.hpp +++ b/common/include/pcl/common/impl/copy_point.hpp @@ -43,6 +43,7 @@ #include #include +#include // for memcpy namespace pcl {