Adjust brightness of all my bright field images according to reference slice

Dear all,
I have 100 images (separate slices) and also 50 stacks from a different experiment. All images are bright field images.

Every image has its own distribution of gray values as expected. Different mean, different min and max values.

I want all image to have the same appearance (same brightness). I tried to normalize the histograms but this does weird things. The best option I found is to adjust the min and max values. If I do this per image (which is crazy work), all images look almos with the same brightness. So wihtout modifying the mean value, just playing around with the min max values I can do the job.

My question is, is there any macro automatic way to do this adjustment automatically?


Do you want the appearance to be the same, or the values to be the same? If you change the appearance, the mean (and other measures) don’t change. It is just a matter of changing the lookup table, that translates the grey values in your image to pixel values on the screen. See the manual for setMinAndMax and its associated example code.

Thank you very much for your reply, I want just the appeareance to be the same, I have just realized that by stablishing the same min and max value for all images, now the look the same.