Skip to content

Separate the setups of a Leica container into scans - #54

Open
mahach666 wants to merge 2 commits into
mainfrom
feature/issue-3-leica-setup-scans
Open

mahach666 wants to merge 2 commits into
mainfrom
feature/issue-3-leica-setup-scans

Conversation

@mahach666

Copy link
Copy Markdown
Contributor

Closes #3

What changed

  • A Leica container (.lgsx / .lgs) that assigns its points to its setups now opens as one scan per setup. The scan carries the id and the name of its setup (LgsxScan.Id / LgsxScan.Name), and LgsxDocument.Setups lists the setups of the container with the range each one declares.
  • A setup owns a range of the point data when the range it declares in the table of contents lies inside the point data entry. A point block belongs to the setup whose range holds it. The chain of point blocks is now read once, in one place, so the assignment and the decoding agree on where a block starts.
  • A container that does not assign its points (no setup declares a range, two setups claim the same range, or a block belongs to no setup) still opens as one scan with the id unified-cloud and the warning that the points are not assigned to the setups.

Files changed

  • src/PclIO/Formats/Leica/LgsxDocument.cs: setup entries are collected with their range, the point blocks are assigned to them, LgsxSetup is a new public type, LgsxScan reads only the blocks that belong to it.
  • tests/PclIO.Tests/SyntheticFixtures.cs: the synthetic container can give every setup its own point block and declare its range (assignPointsToSetups, overlappingSetupRanges).
  • tests/PclIO.Tests/FormatTests.cs: new tests for one scan per setup, a setup without points and two setups that claim the same points.
  • README.md, docs/public-api.md, CHANGELOG.md: the new behaviour.

Tests

  • dotnet build — 0 warnings, 0 errors.
  • dotnet test — 595 passed, 0 failed, 10 skipped (the tests that need private scan files) on .NET 8 and .NET 10.

Limits

  • The assignment is read from the table of contents of the container: a setup entry must declare a range that lies inside the point data entry. Nothing is guessed, and a container that does not say so keeps the previous behaviour of one scan.
  • The poses and the bounds of the setups are still not read (issue Leica: Read scan poses and bounds #4), and the point count is still found by decoding the data (issue Leica: Find the point count without decoding all data #5).

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Leica: Separate the setups of a container into scans

1 participant