// Measures the cellular mitochondrial content in each cell and mitochondrial morphology. Fire up the program with [F9]" macro "Measure mitochondrial Morphology and Mitochondrial Content open image [F9]" { requires("1.33j"); // setFont() added in 1.33j newImage("Welcome Frame", "RGB white", 550, 100, 1); setColor(0, 0, 0); x=50; y=20; setFont("SansSerif" , 16, "bold"); y += 30; setColor(0, 0, 255); drawString("Welcome to the ImageJ Mitophagy Marcro by Ruben K. Dagda" x, y); open(); setTool(2); // Measure the area of the cell on the green channel only run("Restore Selection"); print ("select the region or cell of interest to analyze then press function 10 key"); print ("press F10= processes image for ensuing quantifications"); print ("press F11= measures mitochondrial morphology and area"); print ("press F12= measures colocalized points based on selection"); print ("press F4= closes all unused windows"); } macro "Process RGB Image [F10]" { run("Clear Results"); // Select the outline of the cell containing mitos on the appropriate channel only setTool(2); // Measure the area of the cell on the green channel only run("Copy"); run("Duplicate...","\n"); run("Paste"); run("RGB Split"); close(); close(); run("Invert"); run("Sharpen"); setAutoThreshold(); //run("Threshold..."); run("Restore Selection"); } { macro "Measure [F11]" { run("Clear Results"); run("Set Measurements...", "area circularity fit perimeter redirect=None decimal=3"); run("Analyze Particles...", "display results summarize size distribution minimum=30 maximum=100000000 bins=100 pixel show=Outlines display summarize"); for (i=0; i0) { selectImage(nImages); close(); } //Closes all windows except your results which you can transfer to Excel } macro "Colocalization of pixels [F12] { run("Clear Results"); setTool(2); // Measure the area of the cell on the green channel only run("Copy"); run("Internal Clipboard"); run("Invert"); run("RGB Split"); close(); run("Colocalization ", "channel_1=[Clipboard (green)] channel_2=[Clipboard (red)] ratio=50 threshold_channel_1=50 threshold_channel_2=50 display=255 colocalizated"); selectWindow("Clipboard (red)"); //run("Threshold..."); setAutoThreshold("Default"); run("Analyze Particles...", "size=0.2-infinity circularity=0.00-1.00 show=Outlines display exclude summarize"); selectWindow("Clipboard (green)"); //run("Threshold..."); setAutoThreshold("Default"); run("Analyze Particles...", "size=0.2-infinity circularity=0.00-1.00 show=Outlines display exclude summarize"); selectWindow("Colocalizated points (8-bit) "); //run("Threshold..."); setAutoThreshold("Default"); run("Analyze Particles...", "size=0.2-infinity circularity=0.00-1.00 show=Outlines display exclude summarize"); } }