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

Notes on interacting with skeletons in napari #115

Open
jni opened this issue May 3, 2021 · 0 comments
Open

Notes on interacting with skeletons in napari #115

jni opened this issue May 3, 2021 · 0 comments

Comments

@jni
Copy link
Owner

jni commented May 3, 2021

Some functionality ideas requested by @kevinyamauchi:

  • pick a pixel -> orient skeleton
  • pick a pixel -> prune skeleton
  • pruning: do we mark as pruned or delete and return new Skeleton?

Some potentially useful functions:

  • mapping from coordinates to path id. This would allow e.g. picking from a shapes layer.
  • need to build a cKDTree of only valid coordinates from Skeleton.coordinates. Note that skeleton.coordinates contains some dummy coordinates because some pixel ids become invalid during skeleton construction.

With upcoming PR from @kevinyamauchi, we should be able to do:

skeleton = Skeleton(...)
summary = summarize(skeleton)
summary['index'] = np.arange(summary.shape[0]) + 1  # not sure about this one

label_layer = napari.view_labels(np.asarray(skeleton), properties=summary)
label_layer.color = 'main'

Other ideas:

  • displaying skeleton branches as Shapes layer. BUT, Shapes is still slow for many shapes. Need to improve performance there before this is practical.
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

No branches or pull requests

1 participant