Login  Register

Behavior of "Enhance Contrast" with "normalize" & "use stack histogram" options checked for 16-bit images

Posted by lechristophe on May 24, 2014; 4:27pm
URL: http://imagej.273.s1.nabble.com/Behavior-of-Enhance-Contrast-with-normalize-use-stack-histogram-options-checked-for-16-bit-images-tp5007904.html

Hi,

From my understanding of the ImageJ manual, when using "Enhance Contrast"
on a 16-bit stack with the "normalize" and "use histogram" options checked,
it should adjust and scale all slices to the % saturation based on the
whole stack histogram, not the currently active slice. Is that right? It is
not what happens though, the output depends on the current active slice.

Consider the following macro code:
run("Bat Cochlea Renderings (449K)");
run("16-bit");
run("Add Slice");
run("Enhance Contrast...", "saturated=0.1 normalize process_all use");

As the adjustment is made starting from an all-black slice, everything on
the other slices get saturated.

By contrast, the same code but shifting the current slice to an non-empty
slice before calling "Enhance contrast" results in a different output:

run("Bat Cochlea Renderings (449K)");
run("16-bit");
run("Add Slice");
setSlice(1);
run("Enhance Contrast...", "saturated=0.1 normalize process_all use");

Is this the intended behavior or a bug? If it is, how can I adjust the
contrast of a whole stack to a given % saturation relative to the whole
stack histogram, and keeping the intensity relation between slices(like
when adjusting the contrast of confocal Z-stacks)?

Thanks,

Christophe

--
Christophe Leterrier
Researcher
Axonal Domains Architecture Team
CRN2M CNRS UMR 7286
Aix Marseille University, France

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