Skip to content

Add PointsLoad::fromMultiScanFolder to load and merge a multi-scan laser folder#6324

Open
Fedr wants to merge 2 commits into
masterfrom
multiscan-folder-load
Open

Add PointsLoad::fromMultiScanFolder to load and merge a multi-scan laser folder#6324
Fedr wants to merge 2 commits into
masterfrom
multiscan-folder-load

Conversation

@Fedr

@Fedr Fedr commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a new function to MRMesh for loading the output of a multi-scan laser capture (a folder with many individual scans) and merging it into a single point cloud:

namespace MR::PointsLoad
{
    MRMESH_API Expected<PointCloud> fromMultiScanFolder(
        const std::filesystem::path& folder, const ProgressCallback& callback = {} );
}

What it does

  1. Takes a folder path.
  2. Returns Expected<PointCloud>.
  3. Finds in the folder all pairs of _intempNNN.pose and _laserNNN.ply files, matched by the numeric index NNN (the number of pairs is arbitrary).
  4. Reads each .pose file as an AffineXf3f (a 4×4 row-major rigid transformation) and applies it to the points (and rotates the normals) loaded from the .ply file with the same index.
  5. Returns the union of all transformed points, expressed in the common coordinate frame.

Indices missing a counterpart (.pose without .ply or vice versa) are skipped; if no pairs are found at all an error is returned. Progress is reported per processed pair and the operation is cancelable.

The folder layout matches the export of a laser scanner (e.g. Revopoint), where _intempNNN.pose holds the per-scan pose and _laserNNN.ply holds the corresponding scanned points with normals.

…ser folder

The new MRMesh function takes a folder produced by a multi-scan laser capture,
finds all pairs of _intempNNN.pose and _laserNNN.ply files (matched by index NNN,
arbitrary count), reads each .pose as a 4x4 row-major rigid AffineXf3f, applies it
to the points and normals loaded from the corresponding .ply, and returns the union
of all transformed points as a single PointCloud.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Fedr Fedr added the enhancement New feature or request label Jun 25, 2026
Relocate the function together with its file-name parsing and .pose reading
helpers out of MRPointsLoad into new MRMultiScanLoad.{h,cpp}, and register both
files in MRMesh.vcxproj. No behavior change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant