Class Watershed<T extends RealType<T>,B extends BooleanType<B>>
- java.lang.Object
-
- org.scijava.ops.image.image.watershed.Watershed<T,B>
-
- Type Parameters:
T- element type of inputB- element type of mask
- All Implemented Interfaces:
Computers.Arity4<RandomAccessibleInterval<T>,Boolean,Boolean,RandomAccessibleInterval<B>,ImgLabeling<Integer,IntType>>,Consumers.Arity5<RandomAccessibleInterval<T>,Boolean,Boolean,RandomAccessibleInterval<B>,ImgLabeling<Integer,IntType>>
public class Watershed<T extends RealType<T>,B extends BooleanType<B>> extends Object implements Computers.Arity4<RandomAccessibleInterval<T>,Boolean,Boolean,RandomAccessibleInterval<B>,ImgLabeling<Integer,IntType>>
The Watershed algorithm segments and labels a grayscale image analogous to a heightmap. In short, a drop of water following the gradient of an image flows along a path to finally reach a local minimum.
Lee Vincent, Pierre Soille, Watersheds in digital spaces: An efficient algorithm based on immersion simulations, IEEE Trans. Pattern Anal. Machine Intell., 13(6) 583-598 (1991)
Input is a grayscale image with arbitrary number of dimensions, defining the heightmap. It needs to be defined whether a neighborhood with eight- or four-connectivity (respective to 2D) is used. A binary image can be set as mask which defines the area where computation shall be done. If desired, the watersheds are drawn and labeled as 0. Otherwise the watersheds will be labeled as one of their neighbors.
Output is a labeling of the different catchment basins.
- Author:
- Simon Schmid (University of Konstanz)
- Implementation Note:
- op names='image.watershed'
-
-
Constructor Summary
Constructors Constructor Description Watershed()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcompute(RandomAccessibleInterval<T> in, Boolean useEightConnectivity, Boolean drawWatersheds, RandomAccessibleInterval<B> mask, ImgLabeling<Integer,IntType> outputLabeling)TODO-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.scijava.function.Computers.Arity4
accept
-
Methods inherited from interface org.scijava.function.Consumers.Arity5
andThen
-
-
-
-
Method Detail
-
compute
public void compute(RandomAccessibleInterval<T> in, Boolean useEightConnectivity, Boolean drawWatersheds, RandomAccessibleInterval<B> mask, ImgLabeling<Integer,IntType> outputLabeling)
TODO- Specified by:
computein interfaceComputers.Arity4<RandomAccessibleInterval<T extends RealType<T>>,Boolean,Boolean,RandomAccessibleInterval<B extends BooleanType<B>>,ImgLabeling<Integer,IntType>>- Parameters:
in-useEightConnectivity-drawWatersheds-mask-outputLabeling-
-
-