Skip to content

Commit

Permalink
Merge pull request #5894 from mvieth/registration_instantiations
Browse files Browse the repository at this point in the history
Add instantiations for ICP and TransformationEstimationSVD
  • Loading branch information
mvieth authored Dec 17, 2023
2 parents c0c0064 + d7317bb commit 17d983a
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apps/3d_rec_framework/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ PCL_ADD_INCLUDES("${SUBSUBSYS_NAME}" "${SUBSYS_NAME}/${SUBSUBSYS_NAME}/pipeline/

set(LIB_NAME "pcl_${SUBSUBSYS_NAME}")
PCL_ADD_LIBRARY(${LIB_NAME} COMPONENT ${SUBSUBSYS_NAME} SOURCES ${srcs} ${impl_incs_pipeline} ${incs_utils} ${incs_fw} ${incs_fw_global} ${incs_fw_local} ${incc_tools_framework} ${incs_pipelines} ${incs_pc_source})
target_link_libraries("${LIB_NAME}" pcl_apps pcl_common pcl_io pcl_filters pcl_visualization pcl_segmentation pcl_surface pcl_features pcl_sample_consensus pcl_search)
target_link_libraries("${LIB_NAME}" pcl_apps pcl_common pcl_io pcl_filters pcl_visualization pcl_segmentation pcl_surface pcl_features pcl_sample_consensus pcl_search pcl_registration)

if(WITH_OPENNI)
target_link_libraries("${LIB_NAME}" ${OPENNI_LIBRARIES})
Expand Down
2 changes: 1 addition & 1 deletion apps/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ if(VTK_FOUND)
src/manual_registration/pcl_viewer_dialog.ui
BUNDLE)

target_link_libraries(pcl_manual_registration pcl_common pcl_io pcl_visualization pcl_segmentation pcl_features pcl_surface ${QTX}::Widgets)
target_link_libraries(pcl_manual_registration pcl_common pcl_io pcl_visualization pcl_segmentation pcl_features pcl_surface pcl_registration ${QTX}::Widgets)

PCL_ADD_EXECUTABLE(pcl_pcd_video_player
COMPONENT
Expand Down
9 changes: 8 additions & 1 deletion registration/include/pcl/registration/icp.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
#include <pcl/registration/transformation_estimation_point_to_plane_lls.h>
#include <pcl/registration/transformation_estimation_svd.h>
#include <pcl/registration/transformation_estimation_symmetric_point_to_plane_lls.h>
#include <pcl/memory.h> // for dynamic_pointer_cast, pcl::make_shared, shared_ptr
#include <pcl/memory.h> // for dynamic_pointer_cast, pcl::make_shared, shared_ptr
#include <pcl/pcl_config.h> // for PCL_NO_PRECOMPILE

namespace pcl {
/** \brief @b IterativeClosestPoint provides a base implementation of the Iterative
Expand Down Expand Up @@ -447,3 +448,9 @@ class IterativeClosestPointWithNormals
} // namespace pcl

#include <pcl/registration/impl/icp.hpp>

#if !defined(PCL_NO_PRECOMPILE) && !defined(PCL_REGISTRATION_ICP_CPP_)
extern template class pcl::IterativeClosestPoint<pcl::PointXYZ, pcl::PointXYZ>;
extern template class pcl::IterativeClosestPoint<pcl::PointXYZI, pcl::PointXYZI>;
extern template class pcl::IterativeClosestPoint<pcl::PointXYZRGB, pcl::PointXYZRGB>;
#endif // PCL_NO_PRECOMPILE
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@

#include <pcl/registration/transformation_estimation.h>
#include <pcl/cloud_iterator.h>
#include <pcl/pcl_config.h> // for PCL_NO_PRECOMPILE

namespace pcl {
namespace registration {
Expand Down Expand Up @@ -154,3 +155,13 @@ class TransformationEstimationSVD
} // namespace pcl

#include <pcl/registration/impl/transformation_estimation_svd.hpp>

#if !defined(PCL_NO_PRECOMPILE) && \
!defined(PCL_REGISTRATION_TRANSFORMATION_ESTIMATION_SVD_CPP_)
extern template class pcl::registration::TransformationEstimationSVD<pcl::PointXYZ,
pcl::PointXYZ>;
extern template class pcl::registration::TransformationEstimationSVD<pcl::PointXYZI,
pcl::PointXYZI>;
extern template class pcl::registration::TransformationEstimationSVD<pcl::PointXYZRGB,
pcl::PointXYZRGB>;
#endif // PCL_NO_PRECOMPILE
11 changes: 11 additions & 0 deletions registration/src/icp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,15 @@
*
*/

#define PCL_REGISTRATION_ICP_CPP_
#include <pcl/registration/icp.h>
#include <pcl/pcl_config.h> // for PCL_NO_PRECOMPILE

#ifndef PCL_NO_PRECOMPILE
#include <pcl/pcl_exports.h> // for PCL_EXPORTS
#include <pcl/point_types.h>
template class PCL_EXPORTS pcl::IterativeClosestPoint<pcl::PointXYZ, pcl::PointXYZ>;
template class PCL_EXPORTS pcl::IterativeClosestPoint<pcl::PointXYZI, pcl::PointXYZI>;
template class PCL_EXPORTS
pcl::IterativeClosestPoint<pcl::PointXYZRGB, pcl::PointXYZRGB>;
#endif // PCL_NO_PRECOMPILE
13 changes: 13 additions & 0 deletions registration/src/transformation_estimation_svd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,17 @@
*
*/

#define PCL_REGISTRATION_TRANSFORMATION_ESTIMATION_SVD_CPP_
#include <pcl/registration/transformation_estimation_svd.h>
#include <pcl/pcl_config.h> // for PCL_NO_PRECOMPILE

#ifndef PCL_NO_PRECOMPILE
#include <pcl/pcl_exports.h> // for PCL_EXPORTS
#include <pcl/point_types.h>
template class PCL_EXPORTS
pcl::registration::TransformationEstimationSVD<pcl::PointXYZ, pcl::PointXYZ>;
template class PCL_EXPORTS
pcl::registration::TransformationEstimationSVD<pcl::PointXYZI, pcl::PointXYZI>;
template class PCL_EXPORTS
pcl::registration::TransformationEstimationSVD<pcl::PointXYZRGB, pcl::PointXYZRGB>;
#endif // PCL_NO_PRECOMPILE

0 comments on commit 17d983a

Please sign in to comment.