Skip to content

Fix e57 pose update and saving sessions created from e57 - #552

Merged
JanuszBedkowski merged 2 commits into
MapsHD:mainfrom
michalpelka:mp/fix-e57-save
Sep 30, 2026
Merged

JanuszBedkowski merged 2 commits into
MapsHD:mainfrom
michalpelka:mp/fix-e57-save

Conversation

@michalpelka

Copy link
Copy Markdown
Contributor

Fixes #551

Update e57 poses failing (#551)

libE57Format's Writer::NewData3D builds the intensity prototype node with value 0, which throws E57_ERROR_VALUE_OUT_OF_BOUNDS when the source file's intensityMinimum is above 0 (e.g. 1.5259e-05 = 1/65535 in Leica exports). Not Windows-specific. rewrite_e57_poses now clamps the minimum to 0 before writing the header.

Tested on the reporter's Merge_9_11_13.e57 (3 scans, ~34M points each): rewrite succeeds, the moved scan's pose changes, the other poses and all point counts are unchanged.

Saving sessions created from e57 (step 2)

  • Scans imported from e57 only existed in memory under a made-up .laz name, so "Save session as" / "Save subsession" wrote a session pointing to missing files. New PointCloud::laz_in_memory_only is set on e57 import; on save those clouds are exported as .laz next to the session (visible ones only for subsessions).
  • "Save session as" no longer prompts for poses file names. Sessions without them showed an error popup plus two save dialogs whose result replaced the derived names, so cancelling saved a session with empty poses paths. Poses always go to <session>_poses.mrp / <session>_ini_poses.mri.

Tested manually: open e57 → Save session as / Save subsession → reopen.

Note: exported .laz keeps points, intensity and timestamps (no e57 colors), and is downsampled if "Downsample during load" was on. Legacy app not changed.

🤖 Generated with Claude Code

michalpelka and others added 2 commits September 30, 2026 15:40
…apsHD#551)

libE57Format's Writer::NewData3D builds the intensity prototype node with
value 0, which throws E57_ERROR_VALUE_OUT_OF_BOUNDS when the source file's
intensityMinimum is above 0 (e.g. 1/65535 in Leica exports). Clamp the
minimum to 0 before writing the header.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Scans imported from e57 only existed in memory under a made-up .laz name,
so "Save session as" / "Save subsession" wrote a session pointing to
missing files. Add PointCloud::laz_in_memory_only, set it on e57 import,
and export those clouds as .laz next to the session on save (visible ones
only for subsessions).

"Save session as" also no longer prompts for poses file names: sessions
without them showed an error popup plus two save dialogs whose result
replaced the derived names, so cancelling saved a session with empty
poses paths. Poses always go to <session>_poses.mrp / _ini_poses.mri.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JanuszBedkowski
JanuszBedkowski merged commit 67b87c7 into MapsHD:main Sep 30, 2026
5 of 8 checks passed
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.

problem with updating e57 files on windows

2 participants