Package inra.ijpb.plugins
Class Watershed3DPlugin
java.lang.Object
inra.ijpb.plugins.Watershed3DPlugin
- All Implemented Interfaces:
ij.plugin.PlugIn
public class Watershed3DPlugin
extends java.lang.Object
implements ij.plugin.PlugIn
A plugin to perform watershed on a 3D image using flooding simulations,
as described by Soille, Pierre, and Luc M. Vincent. "Determining watersheds
in digital pictures via flooding simulations." Lausanne-DL tentative.
International Society for Optics and Photonics, 1990.
- Author:
- Ignacio Arganda-Carreras
-
Field Summary
Fields Modifier and Type Field Description static double
hMax
the maximum value for dynamicstatic double
hMin
the minimum value for dynamicstatic boolean
use26neighbors
flag to use 26-connectivity -
Constructor Summary
Constructors Constructor Description Watershed3DPlugin()
-
Method Summary
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
use26neighbors
public static boolean use26neighborsflag to use 26-connectivity -
hMin
public static double hMinthe minimum value for dynamic -
hMax
public static double hMaxthe maximum value for dynamic
-
-
Constructor Details
-
Watershed3DPlugin
public Watershed3DPlugin()
-
-
Method Details
-
process
public ij.ImagePlus process(ij.ImagePlus input, ij.ImagePlus mask, int connectivity, double hMin, double hMax)Apply 3D watershed to a 2D or 3D image (it does work for 2D images too).- Parameters:
input
- the 2D or 3D image (in principle a "gradient" image)mask
- binary mask to restrict region of interestconnectivity
- 6 or 26 voxel connectivityhMin
- minimum grayscale level heighthMax
- maximum grayscale level height- Returns:
- labeled catchment basins image
-
run
public void run(java.lang.String arg)Plugin run method, to be called from ImageJ.- Specified by:
run
in interfaceij.plugin.PlugIn
-