path = "http://punias.free.fr/ImageJ/"; open(path + "images/Green.tif"); width = getWidth(); height = getHeight(); greenAsArray = newArray(width * height); for (y = 0; y < height; y++) for (x = 0; x < width; x++) greenAsArray[x + (height * y)] = getPixel(x, y); open(path + "images/Red.tif"); redAsArray = newArray(width * height); for (y = 0; y < height; y++) for (x = 0; x < width; x++) redAsArray[x + (height * y)] = getPixel(x, y); newImage("Theta", "32-bit", width, height, 1); for (y = 0; y < height; y++) for (x = 0; x < width; x++) setPixel(x, y, Math.atan2(greenAsArray[x + (height * y)], redAsArray[x + (height * y)]) * 180 / PI); run("Enhance Contrast", "saturated=0.35"); newImage("R", "32-bit", width, height, 1); for (y = 0; y < height; y++) for (x = 0; x < width; x++) setPixel(x, y, Math.sqrt(Math.sqr(greenAsArray[x + (height * y)]) + Math.sqr(redAsArray[x + (height * y)]))); run("Enhance Contrast", "saturated=0.35"); run("Colocalization Finder", "image_1=R image_2=Theta scatterplot_size=[1024 x 1024]"); // run("Colocalization Finder", "image_1=R image_2=Theta scatterplot_size=[_512 x 512_]"); call("Colocalization_Finder.setScatterPlotRoi", 1000, "", 10, "");