Login  Register

B&C adjustment for single images in stack

Posted by Patrik G. Flammer on Feb 24, 2010; 12:15pm
URL: http://imagej.273.s1.nabble.com/B-C-adjustment-for-single-images-in-stack-tp3689224.html

Dear all,

I aquire stack images (live-cell time-lapse experiment) of particle movement. Durinig the time-course I see strong bleaching of the fluorophores. As I am primarily interested in the movement and not in the absolute intensity, I tried to adjust B&C for every image in the stack so that I could compile a movie file. However, with the macro I used, I just modify the images once, but the saved correction is only adjusted for the last image. Is there a way to correct and save every single image of a stack?

Macro I used:
   n = nSlices;
   if (n==1) exit("Stack required");
   Stack.getStatistics(count, stackMean);
   for (i=1; i<=n; i++) {
run("Enhance Contrast", "saturated=0.5");
      setSlice(i);
      getStatistics(count, mean);
      run("Add...", "slice value="+(stackMean-mean));
   }

Thanks for your help

Patrik