Comments (3)
Can you post a self-contained example somewhere, including the images?
from imglib2-algorithm.
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.
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)
- ExecutorService exception handling HOT 2
- gradientCentralDifference sets wrong boundaries for random accesses
- Remove imagej-common dependency HOT 9
- Seeded watersheds implementation for grayscale and affinity images HOT 2
- Merge fixDependencies branch as soon as possible and re-distribute JAR's HOT 3
- EllipseTest is slow HOT 3
- FloodFill interface is not intuitive
- Unable to use CellImg as input for some algorithms HOT 3
- Timeline for removing deprecated classes HOT 3
- Watershed Labeling deprecated HOT 5
- Potential bug in HyperSphereNeighborhood when used with RealViews.affine and Views.hyperSlice HOT 11
- Deprecate/Remove one of HyperSphere or HyperSphereNeighborhood HOT 2
- Improve DistanceTransform usability HOT 11
- Convenience methods for signed distance transform HOT 1
- Issues with HyperSphereNeighborhood
- HessianMatrix.calculateMatrix() returns all zeros HOT 6
- Cannot use Gauss3 in Spark cluster environment HOT 1
- NonCubic RectangleShape Neighborhood HOT 5
- Unify multithreading handling HOT 7
- Don't print stack trace during InterruptedException. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from imglib2-algorithm.