Re: Flood filling an interval of grey values
Posted by
Wayne Rasband-2 on
Feb 18, 2017; 6:44pm
URL: http://imagej.273.s1.nabble.com/Flood-filling-an-interval-of-grey-values-tp5018127p5018139.html
> On Feb 17, 2017, at 4:53 AM, Stein Rørvik <
[hidden email]> wrote:
>
> The flood fill tool fills any connected regions having the exact same greyscale pixel value as the source pixel.
>
> Is there any plugin or tool that does the same, but instead fills adjacent pixels having values within a certain threshold?
> That is, if the source pixel has value say 50, any connected regions with a value between say 45 and 55 would be filled.
> I need this both for 2D and 3D; but 2D is most important.
>
> In the old NIH Image for Mac classic OS, you could do this quite easily by setting an upper and lower threshold, and then flood filling from a point within the thresholded region while the threshold is active. Then all connected pixels within the threshold would be flood filled.
You can use the changeValues() macro function. For example, changeValues(45,55,0) changes all pixels with values between 45 and 55 to 0.
-wayne
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html