Hi Kenneth,
if you have 8-bit images, you can have a macro that applies your desired
B&C settings to each slice in a loop:
run("Enhance Contrast", "saturated=0.35"); //Auto Brightness&Contrast
run("Apply LUT", "slice");
For 16-bit or 32-bit images, the easiest solution that comes into my
mind is splitting the stack into single images, run Auto B&C on each,
convert each to 8 bits, then combining back into a single stack.
Alternatively, you could get the min/max for each slice and scale it
such that it spans the full 0-65535 range (or any other fixed range).
This can be done by Process>Math>Subtracting the min value and then
multiplying by 65535/(max-min).
To get min/max, e.g. run("Enhance Contrast", "saturated=0.35"); (or any
other percentage of pixels that will be saturated) and then use
getMinAndMax(min, max).
See also the Stack deflicker plugin (it only adjusts brightness, not
contrast):
http://phage.dk/plugins/deflicker.htmlMichael
________________________________________________________________
On 13/03/2017 20:02, Kenneth Sloan wrote:
> I have some very large volumes that go through a small pipeline to
> adjust individual images, are downsized, SIFTed and then cropped. I
> do the original Brightness&Contrast adjustment on a slice-by-slice
> basis, when the slices are still (very large) individual images.
>
> It now seems useful to be able to re-do the B&C adjustment on the
> downsized slices AFTER they have been SIFTed, assembled into a
> volume, and cropped.
>
> Can someone give me a pointer on how to do this, please? Input is a
> grayscale volume, desired output is a grayscale volume where every
> slice has been independently adjusted for B&C.
>
> -- Kenneth Sloan
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html