skan
skan copied to clipboard
[WIP] Get maximum branch
Trying to implement a maximum branch method. Currently not working but with questions as comments .
Hi @snowformatics,
Are you still working on this by any chance? :smiley:
Hi @snowformatics,
Are you still working on this by any chance? 😃
Hi @mkcor ,
unfortunately not but would be still interested to work on it with some support. I was kind of stucked (my first PR)
Cheers
unfortunately not but would be still interested to work on it with some support. I was kind of stucked (my first PR)
Great! How can I help you?
- [ ] Do you need help with Git?
- [ ] Are you able to resolve the current conflict in file
skan/csr.py
? - [ ] Are you able to apply suggested changes?
- [ ] Are you able to follow the testing suggestions made by @jni?
unfortunately not but would be still interested to work on it with some support. I was kind of stucked (my first PR)
Great! How can I help you?
- [N] Do you need help with Git?
- [N] Are you able to resolve the current conflict in file
skan/csr.py
?- [Y] Are you able to apply suggested changes?
- [N] Are you able to follow the testing suggestions made by @jni?
Help would be great, thanks a lot!
Hi @snowformatics,
[N] Are you able to resolve the current conflict in file
skan/csr.py
?
Either use the online editor (by clicking the "Resolve conflicts" button in this page), or use your own editor locally (after merging current master
into your feature branch). In either case, you'll see the conflict highlighted as follows:
Basically, Git needs to know which changes you want to include exactly. Unless you want to use pad
in this PR (but it looks like you're not using it), you want to go for the version that currently lives on master
. So you want to edit out 4 lines:
- the one with <<<<<<<,
- the one with >>>>>>>,
- the one with =======,
- as well as
from .nputil import pad, raveled_steps_to_neighbors
Once you are done (file looks the way you intend), commit and you're done! If you were editing online, don't forget to pull, and if you were working locally, don't forget to push this update.
Hi @snowformatics,
[N] Are you able to resolve the current conflict in file
skan/csr.py
?Either use the online editor (by clicking the "Resolve conflicts" button in this page), or use your own editor locally (after merging current
master
into your feature branch). In either case, you'll see the conflict highlighted as follows:
Basically, Git needs to know which changes you want to include exactly. Unless you want to use
pad
in this PR (but it looks like you're not using it), you want to go for the version that currently lives onmaster
. So you want to edit out 4 lines:
- the one with <<<<<<<,
- the one with >>>>>>>,
- the one with =======,
- as well as
from .nputil import pad, raveled_steps_to_neighbors
Once you are done (file looks the way you intend), commit and you're done! If you were editing online, don't forget to pull, and if you were working locally, don't forget to push this update.
This was very helpful, thanks for your patience! I hope it's correct now.
Great job, @snowformatics! You're welcome.
As per testing, I can see that you started with a 1D image:
image = np.random.random((45,))
Following https://jni.github.io/skan/getting_started.html#extracting-a-skeleton-from-an-image, do I understand correctly:
- you threshold at 0.5 to binarize the 1D image;
- you get a series of blocks of various lengths;
- the 'maximum path length' in this case is the max of all block lengths
?
I think that a 2D toy example would be nice as well, so we can view it with imshow :)