Segmentation of nuclei (Wählby algorithm)

The algorithm identifies nuclei in images of cells stained with a DNA-specific dye (e.g. DAPI).
Updated 17 Sep 2020

View License

wahlbynucleus(nuclearImage,gaussSD,hForMaxima,hForMinima,minSizeOfNucleus) with no output parameters.
nuclearImage - a Matlab matrix or a DipImage to be segmented
gaussSD - SD of the Gaussian filter
hForMaxima - height of the extended h-maxima transform
hForMinima - height of the extended h-minima transform
minSizeOfNucleus - size of the nucleus. After extended h-minima transform regional minima smaller than this will be removed.
matlabOrDipimage - 1: Matlab version of seeded-watershed, 2: DipImage-version of seeded=watershed
weakBorderThr1 - borders with strengths smaller than this will be removed after the 1st watershed transform
weakBorderThr2 - borders with strengths smaller than this will be removed after the 2nd watershed transform (on the distance transformed image)
isInteractive - if 1, borders can be manually removed at the end
Parameters gaussSD, hForMaxima, hForMinima and minSizeOfNucleus can be
optimized by calling the function with 5 input arguments (this is much
faster than the full segmentation).
Reasonably nice segmentation of the wahlby_testimage.tif can be achieved
with the following parameters: [nmask,nmembrane]=wahlbynucleus(a,1,5,3,100,1,25,30,1);
The program implements the algorithm described in the following paper:
Combining intensity, edge and shape information for 2D and 3D segmentation of cell nuclei in tissue sections.
Wählby C, Sintorn IM, Erlandsson F, Borgefors G, Bengtsson E.
J Microsc. 215: 67-76 (2004).

Cite As

Peter Nagy (2024). Segmentation of nuclei (Wählby algorithm) (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2016a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes

Bug fix

- bug fix
- improved GUI for merging objects