skan icon indicating copy to clipboard operation
skan copied to clipboard

[WIP] Get maximum branch

Open snowformatics opened this issue 4 years ago • 7 comments

Trying to implement a maximum branch method. Currently not working but with questions as comments .

snowformatics avatar Nov 02 '20 13:11 snowformatics

Hi @snowformatics,

Are you still working on this by any chance? :smiley:

mkcor avatar Jul 17 '21 10:07 mkcor

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

snowformatics avatar Jul 17 '21 18:07 snowformatics

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?

mkcor avatar Jul 17 '21 19:07 mkcor

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!

snowformatics avatar Jul 26 '21 06:07 snowformatics

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:

conflict

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.

mkcor avatar Jul 26 '21 18:07 mkcor

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:

conflict

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.

This was very helpful, thanks for your patience! I hope it's correct now.

snowformatics avatar Jul 28 '21 05:07 snowformatics

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 :)

mkcor avatar Jul 28 '21 10:07 mkcor