Giter Club home page Giter Club logo

Comments (3)

tpietzsch avatar tpietzsch commented on August 24, 2024

Can you post a self-contained example somewhere, including the images?

from imglib2-algorithm.

kapoorlab avatar kapoorlab commented on August 24, 2024

Hi tpietzsch,

I have put up all the methods and the image needed in one class here:
https://github.com/PreibischLab/ImgLib2TestEnvironment/tree/master/src/main/java/varun
The class of interest is watershedding.java on this page.

The image used is in src/main/resources/. To prep the image for watershedding, distance transform in performed and then intensity inverted DT-image is used to calculate local maxima to get the seed image for the watershedding part, the watershedding method is the first method in the class. I have cherry picked all the methods needed for the watershedding part so the program looks like a JUnit test but for a self contained example I thought it would help identify the error in my implementation (in the method OldWatersherImage there).

Hope this helps. Thanks.

from imglib2-algorithm.

tpietzsch avatar tpietzsch commented on August 24, 2024

You should set the Watershed parameters before you call process()
https://github.com/PreibischLab/ImgLib2TestEnvironment/blob/master/src/main/java/varun/Watershedding.java#L79-L84

You should label each seeds differently. In your case you label them all 1. Therefore the whole image ends up labeled as 1, as you can verify using

ImageJFunctions.show( outputLabeling.getStorageImg() ).setTitle( "labeling storage image" );

Your code for extracting the "Watershed Images" doesn't work, because
https://github.com/PreibischLab/ImgLib2TestEnvironment/blob/master/src/main/java/varun/Watershedding.java#L105
you are not reading the labeling image but the (empty) output image.

I'm closing this issue. The problem is clearly with your code, not with the imglib2 watershed implementation.

from imglib2-algorithm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.