Those two simple plugins perform one-sided 3x3 median filtering:
Median Light: Performs
median filtering only on light pixels, that is, a pixel is modified
only if its intensity is more then a median intensity value in its
neighborhood.
Median Dark: Performs median
filtering only on dark pixels, that is, a pixel is modified only if
its intensity is less then a median intensity value in its
neighborhood.
Examples
Test image with noise.
Test image after applying "Median Dark" filter -
only dark spots are removed.
Above image after applying "Median Light" filter -
white spots are removed.
Installation
Follow the download
link and download half-median.zip . Uncompress its
content to ImageJ plugins directory. Median Light
and Median Dark plugins will be available
in the ImageJ's Plugin menu. The half-median.zip archive contains
source code and binaries.