MeshLib C++ Docs
Loading...
Searching...
No Matches
PointCloudComponents

Functions

Expected< VertBitSet > MR::PointCloudComponents::getLargeComponentsUnion (const PointCloud &pointCloud, float maxDist, int minSize, ProgressCallback pc={})
Expected< VertBitSet > MR::PointCloudComponents::getLargeComponentsUnion (UnionFind< VertId > &unionStructs, const VertBitSet &region, int minSize, ProgressCallback pc={})
Expected< std::vector< VertBitSet > > MR::PointCloudComponents::getLargeComponents (const PointCloud &pointCloud, float maxDist, int minSize, ProgressCallback pc={})
Expected< std::pair< std::vector< VertBitSet >, int > > MR::PointCloudComponents::getAllComponents (const PointCloud &pointCloud, float maxDist, int maxComponentCount=INT_MAX, ProgressCallback pc={})
Expected< UnionFind< VertId > > MR::PointCloudComponents::getUnionFindStructureVerts (const PointCloud &pointCloud, float maxDist, const VertBitSet *region=nullptr, ProgressCallback pc={})
 gets union - find structure for vertices in

Detailed Description

Function Documentation

◆ getAllComponents()

Expected< std::pair< std::vector< VertBitSet >, int > > MR::PointCloudComponents::getAllComponents ( const PointCloud & pointCloud,
float maxDist,
int maxComponentCount = INT_MAX,
ProgressCallback pc = {} )
nodiscard

#include <MRMesh/MRPointsComponents.h>

gets all components of point cloud connected by a distance no greater than

Parameters
maxDist\detail if components number more than the maxComponentCount, they will be combined into groups of the same size
Note
be careful, if point cloud is large enough and has many components, the memory overflow will occur
Parameters
maxComponentCountshould be more then 1
Returns
pair components bitsets vector and number components in one group if components number more than maxComponentCount

◆ getLargeComponents()

Expected< std::vector< VertBitSet > > MR::PointCloudComponents::getLargeComponents ( const PointCloud & pointCloud,
float maxDist,
int minSize,
ProgressCallback pc = {} )
nodiscard

#include <MRMesh/MRPointsComponents.h>

returns vector of point cloud components containing at least minSize points and connected by a distance no greater than

Parameters
maxDist
minSizemust be more than 1

◆ getLargeComponentsUnion() [1/2]

Expected< VertBitSet > MR::PointCloudComponents::getLargeComponentsUnion ( const PointCloud & pointCloud,
float maxDist,
int minSize,
ProgressCallback pc = {} )
nodiscard

#include <MRMesh/MRPointsComponents.h>

returns the union of point cloud components containing at least minSize points and connected by a distance no greater than

Parameters
maxDist
minSizemust be more than 1

◆ getLargeComponentsUnion() [2/2]

Expected< VertBitSet > MR::PointCloudComponents::getLargeComponentsUnion ( UnionFind< VertId > & unionStructs,
const VertBitSet & region,
int minSize,
ProgressCallback pc = {} )
nodiscard

#include <MRMesh/MRPointsComponents.h>

returns the union of vertices components containing at least minSize points

Parameters
unionStructsprepared point union structure
Note
have side effect: call unionStructs.roots() that change unionStructs

◆ getUnionFindStructureVerts()

Expected< UnionFind< VertId > > MR::PointCloudComponents::getUnionFindStructureVerts ( const PointCloud & pointCloud,
float maxDist,
const VertBitSet * region = nullptr,
ProgressCallback pc = {} )
nodiscard

#include <MRMesh/MRPointsComponents.h>

gets union - find structure for vertices in

Parameters
regionconnected by a distance no greater than
maxDist