Flood Fill Tool with pixel value


I would suggest to the Fiji development team to add pixel value to the Flood Fill tool.

Reason: Say I have a peanut shaped object that distance transformed watershed can split into two objects, however for some time-frames it is not able to do that and I use the line tool in Fiji to manually split it into two objects.

Then I want to be able to use Flood Fill tool and specify a pixel intensity value with which it can fill that region.
Segmentation worked, no need for manual cut:

Segmentation did not work, Line tool to cut and Flood Fill to fill the region with specified value:

Can we please do this? It seems a simple but useful enough change for manual correction of integer images.


Hi @kapoorlab,

Does the Flood filler (paint bucket) not do the job?


Hi @bogovicj, the Flood filler does not come with an option to specify the intensity value of the fill, say I want to fill an object with intensity value 254 and then correct it to 231 instead, this can be easily be build in Flood filler as an option that shows up with double click and would speed up manual correction for simple task I mentioned above. Don’t you think?



Ah, I get the issue now.
Try the color picker before you do the flood fill. (If you right-click the icon, you can pick whatever intensity value you want).


@bogovicj I tried the color picker and selected random RGB value options and then did the flood fill, the only label numbers I was able to get were 1 and 2, this is not really user-friendly and scalable, putting a text box in flood fill would be more intuitive and fast way to do such corrections.


Agreed, just trying to help.

That is weird, and not what I experienced. I saw a range of both RGB and gray value, and could choose whatever I wanted.


That is weird, and not what I experienced. I saw a range of both RGB and gray value, and could choose whatever I wanted.

That is because the Integer image I have is 8-bit and if I make it 32 bit, I start getting double numbers instead of integer. If I make it 16 bit, then I seem to have no control over the integer number I am gonna get, for example I tried RGB 11, 22, 33 and the integer number I got by flood fill was 5654 and RGB 1,1,33 gave me 3084.

How would you do such a manual correction to correct the labels for the example that I showed originally?


I can pick any color from here, and whatever I pick gets projected (somehow) to an 8bit value. It’s not actually easy to pick something, and seems that the color that is used for the fill is related to (but not exactly) the color i pick :-/


Vanilla ImageJ is not the best for editing labels, TrakEM2 is better at this, but is a “big hammer” and not the best for quick, one-off adjustments.

These days, I use paintera from @hanslovsky for editing labels. It’s outside of Fiji, which has its downsides (e.g., its less flexible wrt file types), but it’s made specifically for editing labels (it has both 2d and 3d flood fill).



Thanks @bogovicj, I guess that considering everything I am inclined to use Labkit for such corrections, given the modifications needed to do this with FloodFill code and considering the simplicity of the required task, installing Labkit seems to be the fastest solution here.

Paintera is more suitable for dense annotations in bright field/C-elegans annotations, it’s a great tool but is overkill for simple annotation use cases such as this one.

Thanks a lot John

1 Like