Modifier class for point cloud processing.
More...
#include <pointcloudmodifier.hpp>
|
|
using | ProgressCallback = std::function<void (const std::string &, size_t, size_t)> |
| | Callback invoked to report split() progress: (stage, current, total).
|
|
| bool | load (const std::string &file_path, pointcloudcrafter::tools::formats::FileFormat format) |
| | Load a point cloud file based on the specified format.
|
| bool | save (const std::string &file_path, pointcloudcrafter::tools::formats::FileFormat format) |
| | Save point cloud to file based on the specified format.
|
| Modifier & | cropBox (const std::vector< double > &box_params, const bool &negative=false) |
| | Crop box filter.
|
| Modifier & | cropSphere (const double &sphere_params, const bool &negative=false) |
| | Crop sphere filter.
|
| Modifier & | cropCylinder (const double &zylinder_params, const bool &negative=false) |
| | Crop cylinder filter.
|
| Modifier & | voxelFilter (const std::vector< double > &voxel) |
| | Voxel grid filter with subvoxel handling.
|
| Modifier & | outlierRadiusFilter (const double &radius, const int &min_neighbors) |
| | Outlier radius filter.
|
| Modifier & | outlierStatFilter (const double &threshold, const int &mean) |
| | Outlier statistical filter.
|
| Modifier & | transform (const Eigen::Affine3d &transformation) |
| | Apply transformation to the point cloud.
|
| std::map< std::pair< int, int >, Modifier > | split (const double &grid_size, const ProgressCallback &on_progress=nullptr) |
| | Split the point cloud into grid cells along x and y.
|
| Modifier & | timestampAnalyzer (const std::string &file_path) |
| | Save timestamps to a file and print basic statistics.
|
|
void | visualize () |
| | Visualize input and output point clouds.
|
| void | setCloud (const PointCloud::Ptr &cloud) |
| | Set point cloud directly.
|
| const PointCloud::Ptr | getInputCloud () const |
| | Get input point cloud.
|
| const PointCloud::Ptr | getOutputCloud () const |
| | Get output point cloud.
|
|
| static bool | writeGridMetadata (const std::map< std::pair< int, int >, Modifier > &cells, const double &grid_size, const std::string &file_path, const std::string &extension=".pcd") |
| | Write a metadata YAML for a grid split result.
|
Modifier class for point cloud processing.
◆ cropBox()
| Modifier & pointcloudmodifierlib::Modifier::cropBox |
( |
const std::vector< double > & | box_params, |
|
|
const bool & | negative = false ) |
|
inline |
Crop box filter.
- Parameters
-
| box_params | Vector of 6 doubles defining the min and max points of the box |
| negative | If true, removes points inside the box |
- Returns
- Reference to the Modifier object
◆ cropCylinder()
| Modifier & pointcloudmodifierlib::Modifier::cropCylinder |
( |
const double & | zylinder_params, |
|
|
const bool & | negative = false ) |
|
inline |
Crop cylinder filter.
- Parameters
-
| zylinder_params | Radius of the cylinder |
| negative | If true, removes points inside the cylinder |
- Returns
- Reference to the Modifier object
◆ cropSphere()
| Modifier & pointcloudmodifierlib::Modifier::cropSphere |
( |
const double & | sphere_params, |
|
|
const bool & | negative = false ) |
|
inline |
Crop sphere filter.
- Parameters
-
| sphere_params | Radius of the sphere |
| negative | If true, removes points inside the sphere |
- Returns
- Reference to the Modifier object
◆ getInputCloud()
| const PointCloud::Ptr pointcloudmodifierlib::Modifier::getInputCloud |
( |
| ) |
const |
|
inline |
Get input point cloud.
- Returns
- Pointer to the input point cloud
◆ getOutputCloud()
| const PointCloud::Ptr pointcloudmodifierlib::Modifier::getOutputCloud |
( |
| ) |
const |
|
inline |
Get output point cloud.
- Returns
- Pointer to the output point cloud
◆ load()
| bool pointcloudmodifierlib::Modifier::load |
( |
const std::string & | file_path, |
|
|
pointcloudcrafter::tools::formats::FileFormat | format ) |
|
inline |
Load a point cloud file based on the specified format.
- Parameters
-
| file_path | Path to the file |
| format | The file format |
- Returns
- True if successful, false otherwise
◆ outlierRadiusFilter()
| Modifier & pointcloudmodifierlib::Modifier::outlierRadiusFilter |
( |
const double & | radius, |
|
|
const int & | min_neighbors ) |
|
inline |
Outlier radius filter.
- Parameters
-
| radius | Radius for the filter |
| min_neighbors | Minimum number of neighbors to be considered an inlier |
- Returns
- Reference to the Modifier object
◆ outlierStatFilter()
| Modifier & pointcloudmodifierlib::Modifier::outlierStatFilter |
( |
const double & | threshold, |
|
|
const int & | mean ) |
|
inline |
Outlier statistical filter.
- Parameters
-
| threshold | Standard deviation multiplier threshold |
| mean | Number of nearest neighbors to use for mean distance estimation |
- Returns
- Reference to the Modifier object
◆ save()
| bool pointcloudmodifierlib::Modifier::save |
( |
const std::string & | file_path, |
|
|
pointcloudcrafter::tools::formats::FileFormat | format ) |
|
inline |
Save point cloud to file based on the specified format.
- Parameters
-
| file_path | Path to save the file |
| format | The file format |
- Returns
- True if successful, false otherwise
◆ setCloud()
| void pointcloudmodifierlib::Modifier::setCloud |
( |
const PointCloud::Ptr & | cloud | ) |
|
|
inline |
Set point cloud directly.
- Parameters
-
◆ split()
| std::map< std::pair< int, int >, Modifier > pointcloudmodifierlib::Modifier::split |
( |
const double & | grid_size, |
|
|
const ProgressCallback & | on_progress = nullptr ) |
|
inline |
Split the point cloud into grid cells along x and y.
- Parameters
-
| grid_size | Size of each grid cell |
| on_progress | Optional callback reporting progress within each stage |
- Returns
- Map from grid cell index pair (ix, iy)
◆ timestampAnalyzer()
| Modifier & pointcloudmodifierlib::Modifier::timestampAnalyzer |
( |
const std::string & | file_path | ) |
|
|
inline |
Save timestamps to a file and print basic statistics.
- Parameters
-
| file_path | Path to save the timestamps |
- Returns
- Reference to the Modifier object
◆ transform()
| Modifier & pointcloudmodifierlib::Modifier::transform |
( |
const Eigen::Affine3d & | transformation | ) |
|
|
inline |
Apply transformation to the point cloud.
- Parameters
-
| transformation | Eigen Affine3d transformation matrix |
- Returns
- Reference to the Modifier object
◆ voxelFilter()
| Modifier & pointcloudmodifierlib::Modifier::voxelFilter |
( |
const std::vector< double > & | voxel | ) |
|
|
inline |
Voxel grid filter with subvoxel handling.
- Parameters
-
| voxel | Vector of 3 doubles defining the voxel size in x, y, z |
- Returns
- Reference to the Modifier object
◆ writeGridMetadata()
| bool pointcloudmodifierlib::Modifier::writeGridMetadata |
( |
const std::map< std::pair< int, int >, Modifier > & | cells, |
|
|
const double & | grid_size, |
|
|
const std::string & | file_path, |
|
|
const std::string & | extension = ".pcd" ) |
|
inlinestatic |
Write a metadata YAML for a grid split result.
- Parameters
-
| cells | Result map from split() |
| grid_size | Grid size used in split() |
| file_path | Full path for the output YAML file |
| extension | File extension for cell filenames (default ".pcd") |
- Returns
- True if successful, false otherwise
The documentation for this class was generated from the following file: