setBatchMode(true); a="watson1354-2.png";//getTitle(); run("Duplicate...", "title=profile"); run("8-bit"); setThreshold(0, 207); //setAutoThreshold(); //run("Wait For User", "Adjust threshold now"); run("Convert to Mask"); run("Fill Holes"); run("Erode"); run("Duplicate...", "title=profile-1"); run("RGB Color"); a="watson1354-2.png";//getTitle(); imageCalculator("AND", "profile-1",a); //run("Image Calculator...", "image1=profile-1 operation=AND image2="+a); selectWindow("profile"); run("Canvas Size...", "width=329 height=451 position=Center zero"); run("Invert"); run("Gaussian Blur...", "sigma=12"); run("RGB Color"); selectWindow("profile-1"); run("Select All"); run("Copy"); selectWindow("profile"); run("Restore Selection"); setPasteMode("Transparent-zero"); run("Paste"); setBatchMode(false);