How to set threshold manually in macro

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to set threshold manually in macro

nandini189
Hi Guys,

I want to write a macro. My first two commands of the macro are given below.

Run("8-bit");
Run("Find Edges");

After these two commands I want to run the threshold command but I want to be able to set the threshold manually. Run("Threshold") automatically sets the threshold which is not favourable for me.

Can anyone tell me what command I would need to use.

Thanks
N
Reply | Threaded
Open this post in threaded view
|

Re: How to set threshold manually in macro

Julien Colombelli
Hi N,

this manual break into your automatic macro will do:

run("Threshold...");                           // to open the threshold
window if not opened yet
waitForUser("set the threshold and press OK, or cancel to exit
macro");
                                                      // pauses the
execution and lets you access ImageJ manually
                                                      // as long as you
don't press OK, which resumes the macro execution
run("Convert to Mask");                    // to binarize, if you use this
command, don't press 'Apply' in the threshold window


J



On 12 August 2011 17:45, nandini189 <[hidden email]> wrote:

> Hi Guys,
>
> I want to write a macro. My first two commands of the macro are given
> below.
>
> Run("8-bit");
> Run("Find Edges");
>
> After these two commands I want to run the threshold command but I want to
> be able to set the threshold manually. Run("Threshold") automatically sets
> the threshold which is not favourable for me.
>
> Can anyone tell me what command I would need to use.
>
> Thanks
> N
>
> --
> View this message in context:
> http://imagej.588099.n2.nabble.com/How-to-set-threshold-manually-in-macro-tp6680887p6680887.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>



--
Julien Colombelli
Advanced Digital Microscopy
Institute for Research in Biomedicine - IRB Barcelona
Baldiri Reixac, 10
Tel:  +349340-20451
Fax: +34934031116
E-08028 Barcelona - Spain
[hidden email]