// Displays the colocalization of two images and then measures the morphometrics of the //overlapped signal // Installation notes: // Download and Install WCIF ImageJ package from // http://www.uhnresearch.ca/facilities/wcif/fdownload.html // Save this code as .txt file and move file to >Program Files>ImageJ>macros // Make sure it's the correct ImageJ Folder (the WCIF version) if you have multiple versions // open WCIF ImageJ and install the macro by selecting from the ImageJ toolbar: // Plugins>Macros>Install… and then select the .txt file saved earlier. // Push F8, a window will appear to select a file. // First select the red image // another window will appear, now select the green image // ImageJ will then merge the two images and present a threshold image of the colocalized // points. There will also be the original images as well as merge between the two with // colocalized points as white. The image to be analyzed will be autoselected. // Draw around the area of the image to be analyzed. Only points within this area // will be measured // Push F10. ImageJ will perform the measurements and report the results in a new window. // After copying the results, push F11 to close all windows. // Push F9 and repeat // Code below macro “Close All Windows [F11] ” //F11 used as a shortcut to close all active windows { while (nImages>0) { selectImage(nImages); close(); } } macro “Open Images for colocalization [F8] ” //F8 used as shortcut { open(); //select red image run(“8-bit”); //makes image 8-bit open(); //select green image run(“8-bit”); //makes images 8-bit run(“Colocalization Highligter”, “ratio=50 threshold_channel_1=52 threshold_channel_2=52 display=255 colocalized”); //Colocalization Highlighter is a tool from the WCIF version of //ImageJ, adjust threshold here if necessary //user may wish to use this image for making figures setTool(3); //activates freehand selection tool for drawing around region of interest selectWindow(“Colocalized points (8-bit) ”); //selects image containing only colocalized //signals setThreshold(15, 255); //threshold setting not important here } macro “Measure Morphometrics [F10] ” //F10 used as shortcut { run(“Clear Results”); run(“Set Measurements… ”, “area perimeter circularity redirect=None decimal=2”); run(“Analyze Particles… ”, “minimum=5 maximum=500 bins=100 show=Outlines display summarize”); //set size range of particles here for (i=0; i 1, so absolute value needed here }//loop to assign variables from results { AMP= (MP/i); //calculates mean perimeter AMA= (MA/i); //calculates mean area AMC= (MC/i); //calculates mean circularity Rmorph= (AMA/AMP); //measures the area perimeter ratio, a.k.a. interconnectivity print(getTitle()); print(“Count:” +i); print(“Total Area:” +MA); print(“Avg. Perimeter:” +AMP); print (“Avg. Area:” + AMA); print (“Avg. Circularity:”+ AMC); print (“Area/Perim:”+ Rmorph); selectWindow(“Results”); selectWindow(“Log”); } }