Re: Watershed Question
Posted by Gabriel Landini on May 24, 2011; 9:33am
URL: http://imagej.273.s1.nabble.com/Watershed-Question-tp3684479p3684481.html
On Tuesday 24 May 2011 09:32:03 Aryeh Weiss wrote:
> Binary-->Options has a checkbox that allow you select black background.
> This should solve your problem.
>
> I add that I find the issue of black background vs white background in
> ImageJ confusing. For example, the particle analyzer create a mask with
> black objects on a white background, but it is actually an inverse LUT,
> and really the objects are 255 and the background is zero. Yet sometimes
> I run into a plugin that really wants a white background. I have not yet
> sorted this out.
I agree, this is confusing. My approach to this is to tweak 2 places and
write recorded commands to the StartupMacros.txt file to make it work by
default as white objects on a black background.
One is the colour of the picker (so drawing and filling have the right value):
run("Colors...", "foreground=white background=black selection=yellow");
The other is the option of the binary operations (so the binary morphology
operations are correct):
run("Options...", "iterations=1 black pad edm=Overwrite count=1");
I find the inverted LUTs very confusing and I try to avoid them as further
results of processing binary operations between binary images -where one of
them has an inverted LUT- is most unintuitive.
Instead of using that inverted LUT mask from the particle analyzer I use:
Process>Binary>Convert to Mask, which respects the foreground and background
set colours (and has no inverted LUT).
Just remember to also provide the StartupMacros.txt file when exchanging
macros with another user or using a new install as otherwise one can
potentially end up with the inverted results.
I see no other solution than this at the moment.
Cheers
Gabriel