Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Distance transform propagate labels #107

Merged
merged 7 commits into from
Feb 28, 2025
Merged

Conversation

bogovicj
Copy link
Contributor

Working toward propagating a set of labels while performing a distance transform.

transformPropagateLabels(distance, labels, distanceType)

behaves identically to transform with respect to the distance argument, but also
modifies the input labels such that the label at any given point is given by the label
with the closes distance to that point (where the distances are given by

For example, for 1D inputs distance and labels given by:

distance = [ 9.0, 9.0, 1.0, 9.0, 9.0, 9.0,  1.5, 9.0 ]  
labels   = [   4,   2,   1,   0,   8,   0,    2,   0 ]

will modify labels to be:

labels   = [   1,   1,   1,   1,   1,   2,    2,   2 ]

Copy link
Member

@axtimwalde axtimwalde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@axtimwalde axtimwalde marked this pull request as ready for review February 28, 2025 19:55
@axtimwalde axtimwalde merged commit 2e9f965 into master Feb 28, 2025
1 check 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.

2 participants