getAutoThreshold

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

getAutoThreshold

Jjonthelin
Hi everyone, I'm new to using ImageJ, and I'm trying to write a macro that will apply the same threshold to all the pictures within one folder.  I want the macro to first go through each image and collect threshold values generated by AutoThreshold.  The macro should then take the average threshold value and apply it to all of the images.  The main snag that I'm running into is how to use getAutoThreshold() function.  

x = getAutoThreshold();

What else do I need to add to that statement?  
Reply | Threaded
Open this post in threaded view
|

Re: getAutoThreshold

dscho
Hi,

On Tue, 28 Jul 2009, Jjonthelin wrote:

> Hi everyone, I'm new to using ImageJ, and I'm trying to write a macro
> that will apply the same threshold to all the pictures within one
> folder.  I want the macro to first go through each image and collect
> threshold values generated by AutoThreshold.  The macro should then take
> the average threshold value and apply it to all of the images.  The main
> snag that I'm running into is how to use getAutoThreshold() function.
>
> x = getAutoThreshold();
>
> What else do I need to add to that statement?  

You might be interested in reading this tutorial:

http://pacific.mpi-cbg.de/wiki/index.php/How_to_apply_a_common_operation_to_a_complete_directory

Hth,
Dscho
Reply | Threaded
Open this post in threaded view
|

Re: getAutoThreshold

Gabriel Landini
In reply to this post by Jjonthelin
On Tuesday 28 July 2009  09:16:29 Jjonthelin wrote:

> Hi everyone, I'm new to using ImageJ, and I'm trying to write a macro that
> will apply the same threshold to all the pictures within one folder.  I want
> the macro to first go through each image and collect threshold values
> generated by AutoThreshold.  The macro should then take the average
> threshold value and apply it to all of the images.  The main snag that I'm
> running into is how to use getAutoThreshold() function.  
>
> x = getAutoThreshold();
>
> What else do I need to add to that statement?  

You need to read the macro functions supported by ImageJ.

http://rsb.info.nih.gov/ij/developer/macro/functions.html#getThreshold

G