filters: address TODOs for getMinMax3D to be templated and optimized#6409
Open
Stado1 wants to merge 2 commits intoPointCloudLibrary:masterfrom
Open
filters: address TODOs for getMinMax3D to be templated and optimized#6409Stado1 wants to merge 2 commits intoPointCloudLibrary:masterfrom
Stado1 wants to merge 2 commits intoPointCloudLibrary:masterfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the pcl::getMinMax3D overloads for pcl::PCLPointCloud2 to address TODOs by templating coordinate/distance types and applying a few micro-optimizations (e.g., skipping finiteness checks for dense clouds).
Changes:
- Removed the non-templated
PCLPointCloud2getMinMax3Dimplementations fromfilters/src/voxel_grid.cpp. - Replaced the exported non-template declarations in
voxel_grid.hwith templated declarations forPCLPointCloud2. - Added the new templated
PCLPointCloud2getMinMax3Ddefinitions intofilters/include/pcl/filters/impl/voxel_grid.hpp, plus minor formatting cleanups.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| filters/src/voxel_grid.cpp | Deletes the previous float-only PCLPointCloud2 min/max implementations (now moved to templates). |
| filters/include/pcl/filters/voxel_grid.h | Replaces exported non-template API with template declarations for PCLPointCloud2 overloads. |
| filters/include/pcl/filters/impl/voxel_grid.hpp | Adds templated PCLPointCloud2 min/max implementations and dense-branch optimizations. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR addresses the TODOs for getMinMax3D functions for PCLPointCloud2 to improve performance and allow for different types than just float to be used.
implemented templates:
Performance Optimization: