/* Macro to make fake Z series with two color channels For ImageJ 1.50. Michael Cammer 20150908 */ var xydimension = 128; var c = xydimension / 2; var slices = 16; var colors = 2; var spotradius = 2; var numberSpots = 900; macro "make fake Z series 2 colors [q]" { run("Colors...", "foreground=white background=black selection=yellow"); newImage("HyperStack", "8-bit composite-mode", xydimension, xydimension, colors, slices, 1); Stack.setChannel(1); run("Red"); Stack.setChannel(2); run("Green"); getDateAndTime(year, month, dayOfWeek, dayOfMonth, hour, minute, second, msec) random("seed", hour + minute + second + msec); for (i=0; i to make the outer band have the higher coefficient. if (radiusFactor < 0.66) { // The following step allows for defined percentages of colocalization by forcing the spots to be // located in the save Z position. Make the number 0 < # < 1. if (random() < 0.50) z2 = z1; } Stack.setSlice(z1); Stack.setChannel(1); makeOval(x-spotradius, y-spotradius, spotradius*2, spotradius*2); run("Set...", "value=255 slice"); Stack.setSlice(z2); Stack.setChannel(2); makeOval(x-spotradius, y-spotradius, spotradius*2, spotradius*2); run("Set...", "value=255 slice"); } // for i run("Select None"); run("RGB Color", "slices keep"); run("Make Montage...", "columns=4 rows=4 scale=1 first=1 last=16 increment=1 border=1 font=12"); }