Package inra.ijpb.watershed
Class WatershedTransform3D
java.lang.Object
inra.ijpb.watershed.WatershedTransform3D
- Direct Known Subclasses:
MarkerControlledWatershedTransform3D
public class WatershedTransform3D
extends java.lang.Object
Class to apply the watershed algorithm in 3D to an image.
It allows specifying a binary mask to restrict the regions
of interest.
- Author:
- Ignacio Arganda-Carreras
-
Constructor Summary
Constructors Constructor Description WatershedTransform3D(ij.ImagePlus input, ij.ImagePlus mask)
Construct a watershed transformWatershedTransform3D(ij.ImagePlus input, ij.ImagePlus mask, int connectivity)
Construct a watershed transform -
Method Summary
Modifier and Type Method Description ij.ImagePlus
apply()
Apply fast watersheds using flooding simulations, as described by Soille, Pierre, and Luc M.ij.ImagePlus
apply(double hMin, double hMax)
Apply fast watersheds using flooding simulations, as described by Soille, Pierre, and Luc M.java.util.ArrayList<VoxelRecord>
extractVoxelValues(ij.ImageStack inputStack, double hMin, double hMax)
Extract voxel values from input image such that they have value h, hMin <= h <= hMax.int
getConnectivity()
Get the voxel connectivity (6 or 26)void
setConnectivity(int conn)
Set the voxel connectivity (6 or 26)void
setVerbose(boolean verbose)
Set verbose flagMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
WatershedTransform3D
public WatershedTransform3D(ij.ImagePlus input, ij.ImagePlus mask)Construct a watershed transform- Parameters:
input
- input image (usually a gradient image)mask
- binary mask to restrict the region of interest (null to use whole input image)
-
WatershedTransform3D
public WatershedTransform3D(ij.ImagePlus input, ij.ImagePlus mask, int connectivity)Construct a watershed transform- Parameters:
input
- grayscale image (usually a gradient image)mask
- binary mask to restrict the region of interest (null to use whole input image)connectivity
- voxel connectivity (6 or 26)
-
-
Method Details
-
getConnectivity
public int getConnectivity()Get the voxel connectivity (6 or 26)- Returns:
- voxel connectivity
-
setConnectivity
public void setConnectivity(int conn)Set the voxel connectivity (6 or 26)- Parameters:
conn
- voxel connectivity
-
setVerbose
public void setVerbose(boolean verbose)Set verbose flag- Parameters:
verbose
- new verbose flag
-
apply
public ij.ImagePlus apply()Apply fast watersheds 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.- Returns:
- image of labeled catchment basins (with dams)
-
apply
public ij.ImagePlus apply(double hMin, double hMax)Apply fast watersheds 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.- Parameters:
hMin
- the minimum value for dynamichMax
- the maximum value for dynamic- Returns:
- image of labeled catchment basins (with dams)
-
extractVoxelValues
public java.util.ArrayList<VoxelRecord> extractVoxelValues(ij.ImageStack inputStack, double hMin, double hMax)Extract voxel values from input image such that they have value h, hMin <= h <= hMax. A binary mask is used if it exists.- Parameters:
inputStack
- input stackhMin
- minimum grayscale height valuehMax
- maximum grayscale height value- Returns:
- list of input voxel values
-