/*Creating a dashed outline N. Vischer 03.01.19, 22:34 : - Install this set of two macros - Open Demo.tif - select channel 1 - run "Plugins>Macros>Create Smooth Outline" - run "Plugins>Macros>Create Dashed Outline" - zoom-in as desired - go to channel 2 if desired - choose menu Plugins>Utilities>Capture Image Note: see macro text to adjust step, interval, color and line width */ macro "Create Smooth Outline"{ run("Select None"); setAutoThreshold("Default"); doWand(0, getHeight/2, 0, "smooth"); resetThreshold; } macro "Create Dashed Outline"{ step = 3;//increase for larger pauses lineProperty = "stroke=magenta width=0.8"; //change color and line width run("Interpolate", "interval=2 smooth adjust");//increase interval for longer dashes getSelectionCoordinates(xx, yy); len = xx.length; roiManager("reset"); for(jj = 0; jj < len; jj+=step){ makeLine(xx[jj], yy[jj], xx[(jj+1)%len], yy[(jj+1)% len]); run("Properties... ", lineProperty); roiManager("add"); } resetThreshold(); run("Select None"); roiManager("Show All without labels"); }