Skip to content

Lambda-MST v2.0 : identify points by position, add LambdaMSTAxisLabeller - #1857

Open
copyme wants to merge 20 commits into
DGtal-team:mainfrom
copyme:curves2zero
Open

copyme wants to merge 20 commits into
DGtal-team:mainfrom
copyme:curves2zero

Conversation

@copyme

@copyme copyme commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

PR Description

Lambda-MST tangent estimators identified points by their coordinates, so a curve visiting the same lattice point twice got a wrong estimate. They now work on positions along the curve. LambdaMST3DBy2D can be run along a whole 3D curve with the new LambdaMSTAxisLabeller.

  • LambdaMST2D/3D/3DBy2D: points identified by position; the range eval gives complete pencils at both ends of any sub-range (and LambdaMST2D no longer writes outside its result on a sub-range).
  • LambdaMST3D: orphan treatment replaced by reach() of the filter; new uncoveredPoints().
  • LambdaMST3DBy2D: new init with a wider context; tangents oriented along the traversal and of unit length.
  • Naive3DDSSComputer: a validity flag per projection, so the 2D DSSs no longer extend beyond the 3D range; new mainAxis().
  • New LambdaMSTAxisLabeller: axis and runs of a 3D curve, shortest 2D maximal segment (per run and overall) for DSSLengthLessEqualFilter, and evalByRuns().

Breaking changes: the single-point eval(const Point &) is removed from the three estimators (evaluate [it, it + 1)); CLMSTDSSFilter now has operator() and reach() instead of admissibility() and position(); TangentFromDSS3DFunctor takes the eccentricity as (numerator, denominator).

This work was prepared with the help of Claude AI, which cleaned up the experimental code, and helped with debugging and documenting the code.

Checklist

  • I have installed and run the pre-commit hooks (cf CONTRIBUTING.md).
  • Unit-test of your feature with Catch.
  • Doxygen documentation of the code completed (classes, methods, types, members...)
  • Documentation module page added or updated.
  • New entry in the ChangeLog.md added.
  • No warning raised in Debug mode.
  • All continuous integration tests pass (Github Actions)

copyme added 13 commits October 28, 2026 17:52
…fixes

Remove the single-point eval(const Point &). It located the point by its coordinates, so on a curve visiting the same lattice point twice it estimated the wrong visit and mixed the pencils of both visits; it also scanned the whole segmentation for every call.

Points are now identified by their position along the curve. To estimate a single point, call the range eval on [it, it + 1).
… distance filtering

Remove the single-point eval(const Point &) from LambdaMST3D. It located the point by its coordinates, so on a curve visiting the same lattice point twice it estimated the wrong visit and mixed the pencils of both visits; it also scanned the whole segmentation for every call.

Points are now identified by their position along the curve. To estimate a single point, call the range eval on [it, it + 1).
Remove the single-point eval(const Point &) from LambdaMST by 2D. It located the point by its coordinates, so on a curve visiting the same lattice point twice it estimated the wrong visit and mixed the pencils of both visits; it also scanned the whole segmentation for every call.

Points are now identified by their position along the curve. To estimate a single point, call the range eval on [it, it + 1)
LambdaMST3DBy2D needs a range that is functional along one axis, and LambdaMST3D with DSSLengthLessEqualFilter needs a length threshold. LambdaMSTAxisLabeller computes both from the digital curve alone.
The 2D DSSs of the projections could extend beyond the 3D range, so the main axis and the parameters were read from the wrong lengths. Each projection now has a validity flag (bijective and a 2D DSS), which makes a valid 2D DSS cover exactly [begin(), end()), and the new mainAxis() is read from these flags.
@copyme

copyme commented Oct 29, 2026 •

Copy link
Copy Markdown
Member Author

Hello everyone! Long time! Another bigger PR with a new curve discrtization method and new curve types is under way. The changes to the DGtalTools are going to be incorporated once these two PRs are merged (this one here and the curves related one).

@copyme

copyme commented Oct 29, 2026

Copy link
Copy Markdown
Member Author

Seems to be failing now on something not related to the PR. It is eigen fetch problem. I have it also on my machine. Seems like a problem with GitLab.

@copyme

copyme commented Oct 29, 2026

Copy link
Copy Markdown
Member Author

Should be ready for a review.

@copyme

copyme commented Nov 2, 2026

Copy link
Copy Markdown
Member Author

@dcoeurjo @JacquesOlivierLachaud normally this should be ready for a review.

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.

2 participants