| 35 | } |
| 36 | |
| 37 | Expected<VertBitSet> getLargeComponentsUnion( const PointCloud& pointCloud, float maxDist, int minSize, ProgressCallback pc /*= {}*/ ) |
| 38 | { |
| 39 | MR_TIMER; |
| 40 | |
| 41 | assert( maxDist > 0.f ); |
| 42 | assert( minSize > 1 ); |
| 43 | const auto& validPoints = pointCloud.validPoints; |
| 44 | ProgressCallback subPc = subprogress( pc, 0.f, 0.9f ); |
| 45 | auto unionStructsRes = getUnionFindStructureVerts( pointCloud, maxDist, nullptr, subPc ); |
| 46 | if ( !unionStructsRes.has_value() ) |
| 47 | return unexpectedOperationCanceled(); |
| 48 | return getLargeComponentsUnion( *unionStructsRes, validPoints, minSize, subprogress( pc, 0.9f, 1.f ) ); |
| 49 | } |
| 50 | |
| 51 | Expected<MR::VertBitSet> getLargeComponentsUnion( UnionFind<VertId>& unionStructs, |
| 52 | const VertBitSet& region, int minSize, ProgressCallback pc /*= {} */ ) |
no test coverage detected