Re: Maximum entropy thresholding for 16-bit images

Posted by dscho on
URL: http://imagej.273.s1.nabble.com/Maximum-entropy-thresholding-for-16-bit-images-tp3702941p3702944.html

Hi,

On Mon, 1 May 2006, Sanneke Brinkers wrote:

> The current maximum entropy threshold plugin needs 8-bit images as input.
> However, my images are 16-bit TIFF. When I convert the images to 8-bit a lot
> of information is lost, so my question is: Is there a maximum entropy
> thresholding plugin available for 16-bit images?

That's easy. Just change the line

   return PlugInFilter.DOES_8G | PlugInFilter.DOES_STACKS;

to

   return PlugInFilter.DOES_16 | PlugInFilter.DOES_8G | PlugInFilter.DOES_STACKS;

Be warned! A small test with a 256x256 image on my computer said that for
8-bit, the time was 0.051 seconds, but for 16-bit it was 101 seconds!

Also, the difference it makes should be negligible in most cases. It might
be necessary to adjust he contrast a little before 16-bit to 8-bit
conversion, but you should be able to come close to the result of the
16-bit thresholding.

Ciao,
Dscho