29 SmallComponents = 1 << 0,
30 WeaklyConnected = 1 << 1,
33 All = SmallComponents | WeaklyConnected | FarSurface | AwayNormal
42 OutliersDetector() =
default;
51 MRMESH_API Expected<void> prepare(
const PointCloud& pc,
float radius, OutlierTypeMask mask, ProgressCallback progress = {} );
54 MRMESH_API void setParams(
const OutlierParams& params );
56 MRMESH_API const OutlierParams& getParams()
const {
return params_; }
60 MRMESH_API Expected<VertBitSet>
find( OutlierTypeMask mask, ProgressCallback progress = {} );
63 MRMESH_API const std::vector<uint8_t>& getWeaklyConnectedStat() {
return weaklyConnectedStat_; }
66 Expected<VertBitSet> findSmallComponents( ProgressCallback progress = {} );
67 Expected<VertBitSet> findWeaklyConnected( ProgressCallback progress = {} );
68 Expected<VertBitSet> findFarSurface( ProgressCallback progress = {} );
69 Expected<VertBitSet> findAwayNormal( ProgressCallback progress = {} );
72 OutlierParams params_;
75 UnionFind<VertId> unionFindStructure_;
76 std::vector<uint8_t> weaklyConnectedStat_;
77 std::vector<float> farSurfaceStat_;
78 std::vector<float> badNormalStat_;
80 OutlierTypeMask maskCached_ = OutlierTypeMask( 0 );
82 VertBitSet validPoints_;
86struct FindOutliersParams
91 OutlierTypeMask
mask = OutlierTypeMask::All;
93 ProgressCallback progress = {};
#define MR_MAKE_FLAG_OPERATORS(T)
Definition MRFlagOperators.h:6
#define MRMESH_API
Definition MRMeshFwd.h:80
#define MRMESH_CLASS
Definition MRMeshFwd.h:87
Definition MROutlierPoints.h:87
new unsafe MR.OutlierParams finderParams
new unsafe ref MR.OutlierTypeMask mask
new unsafe ref float radius
new unsafe ref float minAngle
new unsafe ref float minHeight
new unsafe ref int maxNeighbors
new unsafe ref int maxClusterSize
Definition MRMesh/MRPointCloud.h:17
MRVOXELS_API double find(const Mesh &mesh, const FindParams ¶ms, FaceBitSet &outUndercuts, const UndercutMetric &metric={})
Definition MRCameraOrientationPlugin.h:8
MRMESH_API Expected< VertBitSet > findOutliers(const PointCloud &pc, const FindOutliersParams ¶ms)
Finding outlier points.