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

Make euclidean_distance_field Faster #7

Open
william-silversmith opened this issue Feb 16, 2020 · 5 comments · Fixed by #11
Open

Make euclidean_distance_field Faster #7

william-silversmith opened this issue Feb 16, 2020 · 5 comments · Fixed by #11
Labels
performance Affects computation time or memory usage.

Comments

@william-silversmith
Copy link
Contributor

Distance field computation seems amenable to a scan-line algorithm and may be a rate-limiting step in Kimimaro.

@william-silversmith william-silversmith added the performance Affects computation time or memory usage. label Feb 16, 2020
@william-silversmith
Copy link
Contributor Author

It's possible to exactly compute the distance in a burst from the point, however, the soon as there is a direction change, a more complex algorithm is needed. Since burst would be far faster than dijkstra and could cover large fractions of a shape, doing a hybrid algorithm would be essentially guaranteed to be faster.

@william-silversmith
Copy link
Contributor Author

Can we combine dijkstra with serial free space bursts? The problem is that if there's a loop in the structure, duplicate effort may be required to correctly deal with overlapping empty spaces.

@william-silversmith
Copy link
Contributor Author

Filling then fixing doesn't seem like it makes things much easier. Dijkstra would then have to look for ways to make the field distance larger, but this would cause dijkstra to go haywire.

Might be able to use a similar scanline fill strategy as in fill_voids. However, what would be the stopping criteria? We can try to detect critical regions and stop there?

@william-silversmith william-silversmith linked a pull request Jul 14, 2020 that will close this issue
1 task
@william-silversmith
Copy link
Contributor Author

We got a good speedup for somata, but there's still a lot on the table.

@william-silversmith
Copy link
Contributor Author

Got another speedup from prefetching (for sufficiently large images).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Affects computation time or memory usage.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant