InsightSoftwareConsortium / ITKSphinxExamples

Cookbook examples for the Insight Toolkit documented with Sphinx
https://examples.itk.org
Apache License 2.0
54 stars 65 forks source link

Watershed with Distancemap Example #48

Open kmader opened 6 years ago

kmader commented 6 years ago

Watershed with distance maps are useful for segmenting lungs, foams, and other cellular materials. I have a Kaggle Kernel that does it with ITK but it would be nice to have pure ITK demos with associated C++ and Python implementations image

jhlegarreta commented 6 years ago

@kmader This is awesome.

I'd be glad to help in adding these to the existing examples. I grant that we are missing a CONTRIBUTING.md file, but you can get some inspiration from the ITK and ITKSoftwareGuide contributing processes.

Please, let me know when you experience difficulties.

jhlegarreta commented 5 years ago

@kmader @thewtex I started having a look at this.

A few comments:

Thanks.

jhlegarreta commented 5 years ago

After taking some time to think about this, I think an solution is to split the notebook code in three pieces:

This will ideally enable separating non-ITK dependencies and providing a clean code.

Will work on it and will contribute with a version as time allows.

jhlegarreta commented 5 years ago

As I am working on this, I have a comment about the code in the kaggle notebook: although there is a section that is aimed at removing small bubbles, I'd say that these are not effectively removed, since in cell 10 the cleaned_img variable in line

cleaned_img = binary_opening(old_img, ball(3))

is local to the loop and never gets used. So I'd say that the loop is just doing a re-labelling, right? @kmader may be there is some cell missing?

kmader commented 5 years ago

Good catch, that looks like a bug!

On Sun, Nov 4, 2018, 20:44 Jon Haitz Legarreta Gorroño < notifications@github.com wrote:

As I am working on this, I have a comment about the code in the kaggle notebook: although there is a section that is aimed at removing small bubbles, I'd say that these are not effectively removed, since the cell 10 line

cleaned_img = binary_opening(old_img, ball(3))

cleaned_img is local to the loop and never gets used. So I'd say that the loop is just doing a re-labelling, right? @kmader https://github.com/kmader may be there is some cell missing?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/InsightSoftwareConsortium/ITKExamples/issues/48#issuecomment-435694948, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHFmI1CcI9Rz1LKU58LxphC91SGB8C8ks5urzWggaJpZM4S6OEh .