setAutoThreshold()

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

setAutoThreshold()

Pang, Zhengyu (GE Global Research)
Dear all,
 
How do I use setAutoThreshold() to select a region from a thresholded
value to the maximum, or sometimes I need to use setAutoThreshold() to
select a region from minimum value to the thresholded value (i.e. The
ability to choose Lower half or upper half)?
 
There is an option to check Dark background for threshold window. Is
there anyway that I could take advantage of this and put it into the
macro?
 
Thanks,
 
Zhengyu
 

Dr. Zhengyu Pang

Biochemistry and Biological Engineering Laboratory

GE Global Research

Biosciences Global Technology Organization

T +1 518 387 4015

M +1 919 724 7116

F +1 518 387 7765

[hidden email]

One Research Circle

Niskayuna, NY 12309

GE imagination at work

 
Reply | Threaded
Open this post in threaded view
|

Re: setAutoThreshold()

Wayne Rasband
On Jul 7, 2009, at 2:42 PM, Pang, Zhengyu (GE, Research) wrote:

> Dear all,
>
> How do I use setAutoThreshold() to select a region from a thresholded
> value to the maximum, or sometimes I need to use setAutoThreshold() to
> select a region from minimum value to the thresholded value (i.e. The
> ability to choose Lower half or upper half)?
>
> There is an option to check Dark background for threshold window. Is
> there anyway that I could take advantage of this and put it into the
> macro?

Use the version of setAutoThreshold() that takes a string argument. As
an example, this macro

       setAutoThreshold("MaxEntropy dark");

uses the MaxEntropy method, with Dark Background enabled, to set the
threshold. There is a example macro at

     http://rsb.info.nih.gov/ij/macros/examples/AutoThresholdingDemo.txt

that uses all 16 available methods to threshold the M51 Galaxy sample
image.

-wayne
Reply | Threaded
Open this post in threaded view
|

Re: setAutoThreshold()

Pang, Zhengyu (GE Global Research)
Wayne,

Thanks for helping out! I got an connection problem. Do you know how to
fix it?

Connection refused: connect
http://rsb.info.nih.gov/ij/images/m51.zip

Thanks!

Zhengyu

 


Dr. Zhengyu Pang
Biochemistry and Biological Engineering Laboratory
General Electric Company Global Research
 
GE Imagination at work

-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of
Wayne Rasband
Sent: Wednesday, July 08, 2009 5:36 PM
To: [hidden email]
Subject: Re: setAutoThreshold()

On Jul 7, 2009, at 2:42 PM, Pang, Zhengyu (GE, Research) wrote:

> Dear all,
>
> How do I use setAutoThreshold() to select a region from a thresholded
> value to the maximum, or sometimes I need to use setAutoThreshold() to

> select a region from minimum value to the thresholded value (i.e. The
> ability to choose Lower half or upper half)?
>
> There is an option to check Dark background for threshold window. Is
> there anyway that I could take advantage of this and put it into the
> macro?

Use the version of setAutoThreshold() that takes a string argument. As
an example, this macro

       setAutoThreshold("MaxEntropy dark");

uses the MaxEntropy method, with Dark Background enabled, to set the
threshold. There is a example macro at

     http://rsb.info.nih.gov/ij/macros/examples/AutoThresholdingDemo.txt

that uses all 16 available methods to threshold the M51 Galaxy sample
image.

-wayne