Hello everyone,
a quick question on the java command to use Image>Adjust>Color Threshold.
Can you explain me or redirect me on some document that explain how the option section of the java command work?
The command is:
IJ.run(“Color Threshold…”, “”);
Is there any documents that explain what I have to put in the second arguments?
Thanks in advance

Can you explain me or redirect me on some document that explain how the option section of the java command work?
The command is:
IJ.run(“Color Threshold…”, “”);
Is there any documents that explain what I have to put in the second arguments?

I do not believe that the “Color Threshold…” command makes
use of the options String that is passed as the second argument
to the IJ.run() method.

“Runs an ImageJ command, with options that are passed to the
GenericDialog and OpenDialog classes.”

Looking at the source for ColorThresholder.java, I see no use
of GenericDialog (and no call to Macro.getOptions()),
leading me to conclude that the options String is ignored.

The following is interesting:

Open an image. Then open the macro Recorder,Plugins > Macro > Record.... Then runImage > Adjust > Color Threshold..., and click the
“Macro” button at the bottom of the “Threshold Color” dialog.

You will see that doing so populates the macro Recorder not
with a call to “Color Threshold…” (with options passed to it),
but with a bunch of code that varies with what options you
have selected in the “Threshold Color” dialog.

This suggests to me that ColorThresholder was designed
to be inherently interactive, and is probably not easy to fully
automate from code (java or otherwise). (You could use the
code written into the macro Recorder to guide you in writing
your own code that reproduces what “Color Threshold…”
does.)