From: Michael Ellis Date: September 6, 2012 7:06:50 AM EDT To: "Rasband, Wayne Subject: Re: Inconsistent Results With scripting run("Interpolate"); Possible ImageJ Bug. Wayne, Thanks a million for this. I had missed the makeSelection(type, xs, ys) macro function. I have implemented a macro reorderROICordinates  that reorders freehand/traced ROIs. I enclose it here in case this it is of interest or use for anyone. Once again, many thanks for your help. -- Michael Ellis macro "StartTest [s]" { roiManager("reset"); newImage("Untitled", "8-bit Black", 300, 300, 1); makeOval(50, 50, 200, 200); setForegroundColor(126, 126, 126); run("Fill", "slice"); } macro "Test Tool - Cff0O00ffO3399O6633"{ roiManager("reset"); getCursorLoc(x, y, z, flags); // Record cursor location setThreshold(10, 255); doWand(x, y); reorderROICordinates(); run("Interpolate", "interval=3 smooth"); roiManager("Add"); doWand(x+1, y+2); // Click in a different position reorderROICordinates(); run("Interpolate", "interval=3 smooth"); roiManager("Add"); resetThreshold(); selectedROIIndexes = newArray(0,1); roiManager("Select", selectedROIIndexes); roiManager("XOR"); } /*  * Return index of topmost, leftmost coordinate in coordinate list  * x: IN array of x coordinates  * y: IN array of y coordinates  */ function getTopLeft(x, y) { index = 0; for (i=0; i