number of bins use by automatic threshold in 32bit images

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

number of bins use by automatic threshold in 32bit images

Carnë Draug
Hi

I've been studying some automatic threshold algorithms and was looking
at the source of ImageJ. What I'm trying to understand is what is the
size of the histogram used when images of the 32bit type? No question
comes up so what's the default?

I was tracking the source down (but I don't know much about java). I'm
looking at the source in
src-plugins/Auto_Threshold/src/main/java/fiji/threshold/Auto_Threshold.java

Thanks in advance
Carnë

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: number of bins use by automatic threshold in 32bit images

Gabriel Landini
On Thursday 27 Sep 2012 15:32:58 you wrote:

> I've been studying some automatic threshold algorithms and was looking
> at the source of ImageJ. What I'm trying to understand is what is the
> size of the histogram used when images of the 32bit type? No question
> comes up so what's the default?
>
> I was tracking the source down (but I don't know much about java). I'm
> looking at the source in
> src-plugins/Auto_Threshold/src/main/java/fiji/threshold/Auto_Threshold.java
>
> Thanks in advance
> Carnë

I do not know exactly about the built-in IJ thresholder, but the one I wrote
http://www.dentistry.bham.ac.uk/landinig/software/autothreshold/autothreshold.html
supports only 8 and 16 bit images (so the full width 8 and 16 bit histograms
respectively, the latter thanks to Johannes Schindelin).

I guess that IJ (which implements the methods in my plugin) might be re-
binning the 32bit images into 8 bit histograms. I am not sure how it handles
the 16bit images because the 16 bit support was added after the methods were
ported to IJ.

Cheers

Gabriel

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: number of bins use by automatic threshold in 32bit images

Unruh, Jay-2
The ImageJ thresholder automatically generates a 256 bin histogram, but you can specify the size programmatically with the ImageProcessor setHistogramSize(int size) function.  The histogram size information resides in the ImageProcessor class (http://rsb.info.nih.gov/ij/developer/source/ij/process/ImageProcessor.java.html) and is read by the threshold adjuster (http://rsb.info.nih.gov/ij/developer/source/ij/plugin/frame/ThresholdAdjuster.java.html) and passed to the autothresholder (http://rsb.info.nih.gov/ij/developer/source/ij/process/AutoThresholder.java.html) that Gabriel just mentioned.  I don't know if there is a way to increase the size from a macro or elsewhere.  As Gabriel mentioned, the ImageJ version appears to be 8-bit specific.

Jay

-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Gabriel Landini
Sent: Thursday, September 27, 2012 10:13 AM
To: [hidden email]
Subject: Re: number of bins use by automatic threshold in 32bit images

On Thursday 27 Sep 2012 15:32:58 you wrote:

> I've been studying some automatic threshold algorithms and was looking
> at the source of ImageJ. What I'm trying to understand is what is the
> size of the histogram used when images of the 32bit type? No question
> comes up so what's the default?
>
> I was tracking the source down (but I don't know much about java). I'm
> looking at the source in
> src-plugins/Auto_Threshold/src/main/java/fiji/threshold/Auto_Threshold
> .java
>
> Thanks in advance
> Carnë

I do not know exactly about the built-in IJ thresholder, but the one I wrote http://www.dentistry.bham.ac.uk/landinig/software/autothreshold/autothreshold.html
supports only 8 and 16 bit images (so the full width 8 and 16 bit histograms respectively, the latter thanks to Johannes Schindelin).

I guess that IJ (which implements the methods in my plugin) might be re- binning the 32bit images into 8 bit histograms. I am not sure how it handles the 16bit images because the 16 bit support was added after the methods were ported to IJ.

Cheers

Gabriel

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: number of bins use by automatic threshold in 32bit images

Carnë Draug
In reply to this post by Carnë Draug
On 30 September 2012 03:10, Rasband, Wayne (NIH/NIMH) [E]
<[hidden email]> wrote:

> On Sep 27, 2012, at 10:32 AM, Carnë Draug wrote:
>> I've been studying some automatic threshold algorithms and was looking
>> at the source of ImageJ. What I'm trying to understand is what is the
>> size of the histogram used when images of the 32bit type? No question
>> comes up so what's the default?
>>
>> I was tracking the source down (but I don't know much about java). I'm
>> looking at the source in
>> src-plugins/Auto_Threshold/src/main/java/fiji/threshold/Auto_Threshold.java
>
> This is the source code for the Image>Adjust>Auto Threshold command in Fiji. The ImageJ automatic thresholding source is at
>
>     http://imagej.nih.gov/ij/developer/source/ij/process/AutoThresholder.java.html
>
> In ImageJ, the histograms used for thresholding always have a size of 256.

On 27 September 2012 19:20, Unruh, Jay <[hidden email]> wrote:
> The ImageJ thresholder automatically generates a 256 bin histogram, but you can specify the size programmatically with the ImageProcessor setHistogramSize(int size) function.  The histogram size information resides in the ImageProcessor class (http://rsb.info.nih.gov/ij/developer/source/ij/process/ImageProcessor.java.html) and is read by the threshold adjuster (http://rsb.info.nih.gov/ij/developer/source/ij/plugin/frame/ThresholdAdjuster.java.html) and passed to the autothresholder (http://rsb.info.nih.gov/ij/developer/source/ij/process/AutoThresholder.java.html) that Gabriel just mentioned.  I don't know if there is a way to increase the size from a macro or elsewhere.  As Gabriel mentioned, the ImageJ version appears to be 8-bit specific.

Hi

thanks for your answers. Also being able to look at the source is very
educative.

Carnë

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html