On May 13, 2014, at 9:12 AM, Straatman, Kees (Dr.) wrote:
> Dear Wayne and list,
>
> I just noticed after a question from one of the users that if I record autothreshold in the macro recorder it records a minimum and maximum value. However, this is depending on the image. For the blobs image I get in the recorder:
>
> setAutoThreshold("Default");
> //run("Threshold...");
> setThreshold(126, 255);
> setOption("BlackBackground", false);
> run("Convert to Mask");
>
> When this code is used in a macro you obviously get the wrong threshold when using a different image.
> I would expect something like:
>
> setAutoThreshold("Default");
> //run("Threshold...");
> run("Convert to Mask");
>
> Is this a bug or intended behaviour? I use ImageJ 1.48v in Fiji.
This is a bug that is fixed in the latest daily build (1.49a21). This is what is now recorded when you use Image>Adjust>Threshold and Process>Binary>Convert to Mask on the Blobs sample image:
setAutoThreshold("Default");
//run("Threshold...");
//setThreshold(126, 255);
setOption("BlackBackground", true);
run("Convert to Mask");
-wayne
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html