// Normalize Stack Means // // Normaiizes stack means by adding the difference between // the stack mean and image mean to each image in the stack. n = nSlices; if (n==1) exit("Stack required"); Stack.getStatistics(count, stackMean); for (i=1; i<=n; i++) { setSlice(i); getStatistics(count, mean); run("Add...", "slice value="+(stackMean-mean)); }