macro "Fill Black Objects Including Edge Objects" { /* v220614 1st version PJL v220701 more pixels sampled */ if(!is("binary")) run("Convert to Mask"); if(is("Inverting LUT")) run("Invert LUT"); if (bitDepth()==16) midMax = 65535/2; else midMax = 255/2; /* Make sure black objects on white background for consistency */ yMax = Image.height-1; xMax = Image.width-1; cornerPixels = newArray(getPixel(0,0),getPixel(1,1),getPixel(0,yMax),getPixel(xMax,0),getPixel(xMax,yMax),getPixel(xMax-1,yMax-1)); Array.getStatistics(cornerPixels, cornerMin, cornerMax, cornerMean, cornerStdDev); if (cornerMean