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

add path pruning, __array__ method, and longest shortest branch detection to Skeleton #117

Merged
merged 8 commits into from
Aug 3, 2021

Conversation

kevinyamauchi
Copy link
Collaborator

This PR adds the ability to prune paths from a Skeleton. We have additionally added a utility function to determine which paths are part of a main branch of a skeleton (i.e., have the longest, shortest path).

@kevinyamauchi kevinyamauchi changed the title [WIP] add path pruning to Skeleton add path pruning, __array__ method, and longest shortest branch detection to Skeleton Aug 2, 2021
@jni
Copy link
Owner

jni commented Aug 2, 2021

Looks like something went wrong with the merge, @kevinyamauchi! Tests are failing with:

    from .nputil import pad, raveled_steps_to_neighbors

pad was removed in favour of np.pad (which did not exist when this lib was written!). I think if you can remove that import we should be golden!

@kevinyamauchi
Copy link
Collaborator Author

Done!

@kevinyamauchi
Copy link
Collaborator Author

Currently, there are a couple of caveats to this PR that are related to how junctions are currently represented (#133):

  • the junction pixels in the label image that is generated by the Skeleton.__array__ method may have their own unique label value.
  • the Skeleton.prune method can leave one pixel behind from the pruned branch at the junction from which the branch was pruned.

For the pruning issue, since we know the junction at which the pruning has occurred, we can likely fix the artifacts. Additionally, there may be some ideas here for cleaning up the pruning site.

@jni
Copy link
Owner

jni commented Aug 3, 2021

Thanks @kevinyamauchi! The failing CI has nothing to do with this PR:

  • Windows failure is known, see Fix remaining issues with GitHub Actions #130
  • Ubuntu just failed on a timing test, probably just due to random fluctuations in the VM load.
  • macOS failed because of some environment activation issues (matplotlib not found, even though it is installed). @NelleV was telling me about similar issues in her own CI, though she didn't have a satisfying resolution (move the testing to a bash script 😬). Anyway, we'll investigate after this PR.

@jni jni merged commit ac04540 into jni:master Aug 3, 2021
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