Help with Macro required

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Help with Macro required

Peteus
I'm trying to automate a list of tasks. I have a set of image stacks. Firstly they require averaging via z-protection. Then a back ground subtraction of another image. Finally a "normalisation" of a select area using the auto feature from brightness/contrast.
I ran the record which gave me:
run("Z Project...", "projection=[Average Intensity]");
run("Close");
saveAs("Tiff", "C:\\XXXX);
open("C:\\XXXX\\Subtractimage.tif");
imageCalculator("Subtract create 32-bit", "AVGStack.tif","Subtractimage.tif");
//setTool("oval");
makeOval(624, 390, 1350, 1353);
//run("Brightness/Contrast...");
run("Enhance Contrast", "saturated=0.35");

I'm having issues because the macro is very specific to the files. I some how need to get it to run the Z Project perform the average open the specific image. Then get it to take the newly averaged image run the subtraction from it rather than the previously run set.