Macro Error " no window with title aaaresults" is found

Hello guys,
I am using INSIDIA macro code with ImageJ. It is a really useful tool to analyze spheroids in terms of shape, size and roundness etc. In the last caple of they the code stopped working and keep show the macro error "no window with title aaaresult is found.
I am not the developer, I am just a simple user. would someone help to fix these issues? need to analyse thousands of pictures

Please see below the macro

/////////////////////////////////////////
////////////// FUNCTIONS////////////////
///////////////////////////////////////
////note: do not modify this part
function closing(a) {
run(“8-bit”);
run(“Auto Threshold”, “method=Default white”);
run(“Dilate”);
run(“Dilate”);
run(“Erode”);
run(“Erode”);
run(“Dilate”);
run(“Dilate”);
run(“Erode”);
run(“Erode”);
run(“Fill Holes”);
run(“Erode”);
}
function SSdialog(franginum,frangimin,frangimax){
label=newArray(3);
default=newArray(3);
label[0]=“accept segmentation”;
label[1]=“manual threshold”;
label[2]=“Frangi filter”;
default[0]=true;
default[1]=false;
default[2]=false;
Dialog.create(“Spheroid segmentation”);
Dialog.addCheckboxGroup(3,1,label,default);
Dialog.addNumber(“number”, franginum);
Dialog.addNumber(“minimum”, frangimin);
Dialog.addNumber(“maximum”, frangimax);
Dialog.show();
}
function printArray(a) {
print("");
for (i=0; i<a.length; i++)
print(a[i]);
}
function error(err) {
Dialog.create(“Error”);
Dialog.addMessage(err);
Dialog.show();
}
function largest(input,X,xc,yc){
run(“Analyze Particles…”, “size=0-Infinity circularity=0.00-1.00 show=Nothing display clear”);
totalArea=0;
for(j=0; j<nResults; j++){
current=getResult(“Area”,j);
if(current>totalArea){
totalArea=current;
xc=round(getResult(“XM”,j));
yc=round(getResult(“YM”,j));
}
}
run(“Analyze Particles…”, “size=”+totalArea+"-Infinity show=Masks display clear");
run(“Dilate”);
run(“Clear Results”, “”);
run(“Grays”);
run(“Select None”);}
////////////////////////////////////////
////////////////////////////////////////
////////////////////////////////////////
/////////////////////////////////////////
/////IMAGEJ SETTINGS////////////////////
/////////&ERRORS///////////////////////
//////////////////////////////////////
////note: do not modify this part
run(“Close All”);
run(“Set Measurements…”, “area mean min centroid center perimeter fit shape feret’s redirect=None decimal=3”);
setForegroundColor(0, 0, 0);
run(“Options…”, “iterations=1 count=1 black”);
roiManager(“reset”);
getDateAndTime(year, month, dayOfWeek, dayOfMonth, hour, minute, second, msec);
single=“Please select a single option”;
instr=“Please follow the instructions to prepare your folders”;
////////////////////////////////////////
////////////////////////////////////////
////////////////////////////////////////
////////////////////////////////////
//////MENU 1 CHOOSE DIR////////////
/////MENU 2 SS Y/N////////////////
/////////////////////////////////
////note: do not modify this part
maindir = getDirectory(“Choose main folder”);
do{
mode=newArray(2);
Dialog.create(“Are your spheroids segmented?”);
Dialog.addCheckbox(“Yes, proceed to density map & density profile”,false);
Dialog.addCheckbox(“No, I want to do spheroid segmentation”,true);
Dialog.show();
mode[0]=Dialog.getCheckbox();
mode[1]=Dialog.getCheckbox();
mainlist = getFileList(maindir);
nfolder=0;/// number of folder in the mainfolder
for (i=0; i<mainlist.length; i++) {
if (endsWith(mainlist[i], “/”)){
nfolder=nfolder+1;
}
else
mainlist[i] =""; ///removes image files from list
}
numbdir=0;
for(G=0; G<nfolder;G++){
dir = maindir+mainlist[G];
list = getFileList(dir);
c=list.length;
tof=tof+c;
for (i=0; i<c; i++){
if (File.isDirectory(dir+list[i])==true){
numbdir=numbdir+1;}
}}
tof=tof-numbdir;
if (mode[1]==mode[0] ) {
error(single);
r=0;}
else if(((mode[0]==true)&(numbdir!=nfolder))||((mode[1]==true)&(numbdir>0))|| (mainlist.length!=nfolder)){
error(instr);
r=0;
}
else
r=1;
} while (r==0);
////////////////////////////////////////
////////////////////////////////////////
////////////////////////////////////////
/////////////////////////////////////////
/////FLUORESCENCE MENU///////////////////
////////////////////////////////////////
Dialog.create(“Do you work with fluorescence images?”);
Dialog.addCheckbox(“Yes”,false);
Dialog.addMessage(“if you check Yes your images will be inverted”);
Dialog.show();
fluo=Dialog.getCheckbox();
////////////////////////////////////
//////////INSIDIA PART 1///////////
//////SPHEROID SEGMENTATION///////
/////////////////////////////////
if ((mode[1]==true) & (mode[0]==false)) {
for(G=0; G<nfolder;G++){
dir = maindir+mainlist[G];
list = getFileList(dir);
c=list.length;
if (G==0) {
xc=newArray(tof);
yc=newArray(tof);
}
myDir = dir+“aaaresults”+ File.separator;
File.makeDirectory(myDir);
name=newArray(c);
res=newArray(c);
for (i=0; i<c; i++) {
X=cG+i;
name[i]=replace(list[i],".tif",“res”);
res[i]=myDir+name[i];
open(dir+list[i]);
run(“Set Scale…”, “distance=0 known=0 pixel=1 unit=pixel”);
run(“8-bit”);
if (fluo==true)
run(“Invert”);
h=getHeight();
w=getWidth();
run(“Select None”);
selectWindow(list[i]);
run(“Duplicate…”, “Duplicate.tif”);
run(“Auto Threshold”, “method=[Default]”);
rename(list[i]+“bw”);
selectWindow(list[i]+“bw”);
run(“Fill Holes”);////////////NEW
largest((list[i]+“bw”),X,xc,yc);
selectWindow("Mask of "+list[i]+“bw”);
rename(“Mask of “+list[i]);
selectWindow(list[i]+“bw”);
run(“Close”);
selectWindow(“Mask of “+list[i]);
doWand(round(xc[X]), round(yc[X]));
roiManager(“Add”);
selectWindow(list[i]);
roiManager(“Select”,0);
listisempty=0;
menu=true;
check=false;
while (menu==true){
SSdialog(4,0.5,1);
franginum=Dialog.getNumber();
frangimin=Dialog.getNumber();
frangimax=Dialog.getNumber();
check=Dialog.getCheckbox();
manual=Dialog.getCheckbox();
frang=Dialog.getCheckbox();
if(listisempty==0 && roiManager(“count”)!=0){
roiManager(“delete”);}
segmcheck=check+manual+frang;
if (segmcheck!=1){
error(single);
listisempty=1;
}
else
menu=false;
if (check==false){
selectWindow(“Mask of “+list[i]);
run(“Close”);
selectWindow(list[i]);
run(“Select None”);
/////frangi thresholding
if (frang==true){
run(“Frangi Vesselness (imglib, experimental)”, “number=”+franginum+” minimum=”+frangimin+” maximum=”+frangimax+””);
closing("vesselness of "+list[i]);
selectWindow("vesselness of "+list[i]);
rename("Mask of "+list[i]);}
////////manual thresholding
else if (manual==true){
selectWindow(list[i]);
run(“Duplicate…”, "title=Mask of "+list[i]);
rename("Mask of “+list[i]);
run(“Threshold…”);
setOption(“BlackBackground”, true);
title = “ManualThreshold”;
msg = “Use the “Threshold” tool to\nadjust the threshold,click apply then click OK”.”;
waitForUser(title, msg);
run(“Invert”);
run(“Fill Holes”);////////////NEW
}
selectWindow("Mask of "+list[i]);
largest(("Mask of "+list[i]),X,xc,yc);
roicheck=roiManager(“count”);
if (roicheck!=0){
roiManager(“reset”);
}
selectWindow(“Mask of Mask of “+list[i]);
doWand(xc[X], yc[X]);
run(“Clear Outside”);
run(“ROI Manager…”);
roiManager(“Add”);
selectWindow(“Mask of Mask of “+list[i]);
run(“Close”);
selectWindow(list[i]);
roicheck=roiManager(“count”);
if (roicheck!=0){
roiManager(“Select”, 0);
}
menu=true;
listisempty=0;
}}
selectWindow(list[i]);
run(“Close”);
roicheck=roiManager(“count”);
if (roicheck!=0){
roiManager(“reset”);}
///// segmented images saving /////
selectWindow(“Mask of “+list[i]);
doWand(xc[X], yc[X]);
run(“Clear Outside”);
run(“Select None”);
saveAs(”.tif”,res[i]);
}
run(“Close All”);
selectWindow(“Results”);
run(“Close”);
}
}
///////////////////////////////////////////////////////////
////////////////////SS PARAMETERS//////////////////////////
///////////////////////////////////////////////////////////
setBatchMode(true);
for(G=0; G<nfolder;G++){
dir = maindir+mainlist[G];
analysisdir=maindir+“analysis”+dayOfMonth+”_”+month+1+“h”+hour+”-”+minute+File.separator;
File.makeDirectory(analysisdir);
anSubdir=analysisdir+mainlist[G];
File.makeDirectory(anSubdir);
list = getFileList(dir); ////list contains results folder in the first line
c=list.length-1;
name=newArray(c);
res=newArray(c);
myDir = dir+“aaaresults”+ File.separator;
if (G==0){
xc=newArray(tof);
yc=newArray(tof);
AreaTotal=newArray(tof);
Perimeter=newArray(tof);
maxRadius=newArray(tof);
minRadius=newArray(tof);
coordinates=newArray(tof);
circularity=newArray(tof);
RadiusE=newArray(tof);
SpecSurf=newArray(tof);
ShapeF=newArray(tof);
EnvArea=newArray(tof);
//DM//
AreaCore=newArray(tof);
AreaInvasion=newArray(tof);
PercCore=newArray(tof);
PercInvasion=newArray(tof);
PeriMap=newArray(tof);
startx=newArray(tof);
starty=newArray(tof);
printnames=newArray(tof);
//DP
RadiusCore=newArray(tof);
RadiusCoreII=newArray(tof);
INTENSE=newArray(tof);
ACMtotal=newArray(tof);
ACMcore=newArray(tof);
ACMinvasion=newArray(tof);
ACMpercCore=newArray(tof);
ACMpercInvasion=newArray(tof);
}
for (i=0; i<c; i++) { ////for all the images in each folder
roicheck=roiManager(“count”);
if (roicheck!=0){
roiManager(“reset”);
}
X=c
G+i;
name[i]=replace(list[i+1],".tif",“res.tif”);
res[i]=myDir+name[i];
open(dir+list[i+1]);
if (fluo==true)
run(“Invert”);
run(“Set Scale…”, “distance=0 known=0 pixel=1 unit=pixel”);
printnames=list[i+1];
printnames=replace(printnames," “,”_");
run(“8-bit”);
h=getHeight();
w=getWidth();
run(“Select None”);
image=“current”+i;
bw=“bw”+i;
selectWindow(list[i+1]);
rename(image);
open(res[i]);
run(“Select None”);
rename(bw);
run(“Set Scale…”, “distance=0 known=0 pixel=1 unit=pixel”);
run(“Analyze Particles…”, “size=0-Infinity circularity=0.00-1.00 show=Nothing display clear”);
totalArea=0;
for(j=0; j<nResults; j++){
current=getResult(“Area”,j);
if(current>totalArea){
totalArea=current;
AreaTotal=getResult(“Area”,j);
Perimeter=getResult(“Perim.”,j);
xc=round(getResult(“XM”,j));
yc=round(getResult(“YM”,j));
maxRadius=(round(getResult(“Feret”,j)))/2;
minRadius=(round(getResult(“MinFeret”,j)))/2;
RadiusE=(round(getResult(“Major”,j)))/2;
circularity=(getResult(“Circ.”,j));
}
}
run(“Clear Results”, “”);
run(“Set Scale…”, “distance=0 known=0 pixel=1 unit=pixel”);
run(“Analyze Particles…”, “size=”+totalArea+"-Infinity show=Masks display clear");
run(“Grays”);
run(“Select None”);
doWand(xc,yc);
doWand(xc,yc);
run(“Convex Hull”);
run(“Measure”);
EnvArea=getResult(“Area”,0);
run(“Clear Results”, “”);
run(“Select None”);
selectWindow(bw);
run(“Close”);
selectWindow(“Mask of “+bw);
rename(bw);RadiusCore=newArray(tof);
RadiusCoreII=newArray(tof);
INTENSE=newArray(tof);
ACMtotal=newArray(tof);
ACMcore=newArray(tof);
ACMinvasion=newArray(tof);
ACMpercCore=newArray(tof);
ACMpercInvasion=newArray(tof);
//////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////
////////////////////////////////////
//////////INSIDIA PART 2///////////
/////////////////////////////////
////IMAGE NORMALISATION/////////
///////////////////////////////
selectWindow(image);
run(“Macro…”, “code=v=(-v+255)”); /////////image inverted
selectWindow(bw);
run(“Select None”);
doWand(xc,yc);
doWand(xc,yc);
roiManager(“Add”);
selectWindow(image);
run(“Select None”);
roiManager(“Select”,0);
run(“Make Inverse”);///area external to spheroid selected
run(“Measure”);
bg=getResult(“Mean”,0);
run(“Clear Results”, “”);
roiManager(“reset”);
selectWindow(image);
run(“Select None”);
run(“Subtract…”, “value=”+bg+””);
///////////////////////////
selectWindow(bw);
run(“Select None”);
run(“Divide…”, “value=255”);
imageCalculator(“Multiply create”, image,bw);///only greyscale spheroid in the image
selectWindow(image);
run(“Close”);
///////////density file///////////////////
selectWindow(“Result of “+image);
run(“Select None”);
run(“Duplicate…”, “Duplicate.tif”);
saveAs(”.tif”,anSubdir+“density”+i);
selectWindow(“density”+i+".tif");
run(“Close”);
selectWindow(bw);
run(“Close”);
selectWindow(“Result of “+image);
run(“Close”);
}
}
//////////////////////////////////
//////Pixel Conversion Menu//////
////////////////////////////////
Dialog.create(“Convert values in microns?”);
Dialog.addNumber(“pixel to micron”, 2.09);
Dialog.addCheckbox(“convert”,true);
Dialog.show();
pixel=Dialog.getNumber();
convert=Dialog.getCheckbox();
xaxisunits=”(um)”;
if (convert==false) {
xaxisunits="(pixel)";
pixel=1;}
run(“Close All”);
selectWindow(“Results”);
run(“Close”);
////////////////////////////////
///////////////////////////////
////////INSIDIA PART 3/////////
/////////DENSITY PROFILE//////////
/////////////////////////////
//Profile Table//
title1 = “Profiles”;
f="["+title1+"]";
run(“New… “, “name=”+f+” type=Table”);
////////////////
for(G=0; G<nfolder;G++){
dir = maindir+mainlist[G];
list = getFileList(dir);
c=list.length-1;
myDir = dir+“aaaresults”+File.separator;
profileth=newArray(c);
anSubdir=analysisdir+mainlist[G];
for (i=0; i<c; i++) {
X=cG+i;
densitysave=anSubdir+“density”+i+".tif";
//////////////////DM file ////////////////////////
open(densitysave);
run(“Median…”, “radius=4”);//////////////////
rename(“density”+i+".tif");
run(“Duplicate…”, “Duplicate.tif”);
rename(“profile”+i);
sumy=0; /// to calculate the integral of the whole curve
selectWindow(“profile”+i);
run(“Concentric Circles”, “circles=”+maxRadius[X]+" line=1 x="+xc[X]+" y="+yc[X]+ " inner=1 outer="+maxRadius[X]+" measure");
y=newArray(nResults);
for(a=0; a<nResults; a++){
y[a]=getResult(“Mean”,a);
sumy=sumy+y[a];
}
////x coordinates for plot////
Xplot=newArray(y.length);
for(xx=0;xx<Xplot.length; xx++){
Xplot[xx]=(xx+1)pixel;
}
print(f,printnames[X]);
for (p=0; p<y.length; p++){
print(f,y[p]);
}
print(f," ");
ACMtotal[X]=pixel
sumy; ////integral of the curve
max=(y[3]+y[5]+y[7]+y[9])/4;
ylength=y.length;
counter=0;
if(i!=0){
for (inte=5;inte<ylength; inte+=5){
sumapp=0;
for(in=0; in<y.length-inte; in++){
sumapp=sumapp+y[in];
}
THEORY=max
(y.length-inte);
delta=sumapp/THEORY100;
counter=counter+1;
if (delta>89){
RadiusCoreII[X]=ylength-inte;
CT=(ylength-(counter
5));
INTENSE=round(y[CT]);
inte=ylength;
}
}
}
else
RadiusCoreII=maxRadius;
///////////////////////////////////////////////////
////////////Profile Plot Creation/////////////////
//plot creation
xaxis=“Distance from centre of mass”+xaxisunits;
Plot.create(“Circle profile”, xaxis, “Intensity”);
Plot.setLimits(0, 1000, 0, 255);
Plot.setFormatFlags(“11001100001111”);
Plot.setLineWidth(i+1.5);
Plot.add(“line”,Xplot, y);
Plot.show();
///plot legend
setColor(0, 0, 0);
drawString(printnames,350,50+11i);
run(“Set Scale…”, “distance=0 known=0 pixel=1 unit=pixel”);
setLineWidth(i
1);
drawLine(330,40+11i,340,40+11i);
rename(“plot”+i);
////create empty plot////
if (i==0){
hp=getHeight();
wp=getWidth();
newImage(“Plot”, “8-bit white”, wp, hp, 1);}
///sum the two plots before drawing the line
imageCalculator(“AND”, “Plot”, “plot”+i);
////draw the line /////
selectWindow(“plot”+i);///axis origin is 60,510
saveAs(“tiff”,anSubdir+“plot”+i);
open(anSubdir+“plot”+i+".tif");
rename(“plot”+i+".tif");
selectWindow(“plot”+i+".tif");
run(“Clear Results”);
run(“Select None”);
//////////////////
run(“16 colors”);
if(i!=0){
setLineWidth(2);
newnumberII=(((9RadiusCoreII[X])/10)+60);
setColor(255, 0, 0);
drawLine(newnumberII, hp, newnumberII, 0);
setColor(0, 0, 0);
///integral of curve below core
for (gg=0;gg<RadiusCoreII[X];gg++){
ACMcore[X]=ACMcore[X]+pixel
y[gg];
}
}
else{
ACMcore=ACMtotal;
}
ACMinvasion=ACMtotal-ACMcore;
ACMpercCore=((ACMcore)/(ACMtotal))*100;
ACMpercInvasion=((ACMinvasion)/(ACMtotal))*100;
drawString(“core”,70,200);
selectWindow(“plot”+i+".tif");
saveAs(“tiff”,anSubdir+“plot”+i);
///////////NEW DENSITY MAP//////////////////////
selectWindow(“density”+i+".tif");
run(“Duplicate…”, “Duplicate.tif”);
rename(“green”+i);
selectWindow(“green”+i);
for(sss=0;sss<w;sss++){
for(jjj=0;jjj<h;jjj++){
test=getPixel(sss,jjj);
if(test>INTENSE){
setPixel(sss,jjj,255); //pixel is set in white
}
}
}
run(“Subtract…”, “value=254”);
run(“Multiply…”, “value=255.000”);
setOption(“BlackBackground”, true);
run(“Make Binary”);
run(“Dilate”);
run(“Fill Holes”);
run(“Erode”);
run(“Analyze Particles…”, “size=0-Infinity circularity=0.00-1.00 show=Nothing display clear”);
apptotalArea=0;
for(jjj=0; jjj<nResults; jjj++){
current=getResult(“Area”,jjj);
if(current>apptotalArea){
apptotalArea=current;
}
}
run(“Analyze Particles…”, “size=”+apptotalArea+"-Infinity show=Masks display clear");
AreaCore=getResult(“Area”,0);
PeriMap=getResult(“Perim.”,0);
AreaInvasion=AreaTotal-AreaCore;
run(“Clear Results”, “”);
run(“Dilate”);
run(“Clear Results”, “”);
run(“Grays”);
run(“Select None”);
imageCalculator(“Add create”, “Mask of green”+i,“density”+i+".tif");
selectWindow(“Mask of green”+i);
run(“Close”);
selectWindow(“green”+i);
run(“Close”);
selectWindow(“density”+i+".tif");
run(“Close”);
selectWindow(“Result of Mask of green”+i);
rename(“density”+i+".tif");
doWand(xc,yc);
run(“Measure”);
selectWindow(“density”+i+".tif");
run(“Red/Green”);
saveAs(".tif",anSubdir+“density”+i);
run(“Close”);
}
selectWindow(“Plot”);
saveAs(“tiff”,anSubdir+“Plot”);
run(“Close All”);
}
/////////////
//montage///
////////////
run(“Close All”);
for(G=0; G<nfolder;G++){
dir=maindir+mainlist[G];
list=getFileList(dir);
c=list.length;
newImage(“HyperStack”, “RGB color-mode”, w, h, 1, 1, 4);
open(dir+list[1]);
selectWindow(list[1]);
run(“Select None”);
run(“Copy”);
selectWindow(“HyperStack”);
Stack.setFrame(1);
run(“Paste”);
close(list[1]);
open(dir+list[c-1]);
selectWindow(list[c-1]);
run(“Select None”);
run(“Copy”);
selectWindow(“HyperStack”);
Stack.setFrame(2);
run(“Paste”);
close(list[c-1]);
anSubdir=analysisdir+mainlist[G]+"/";
open(anSubdir+“density0.tif”);
selectWindow(“density0.tif”);
run(“Select None”);
run(“Copy”);
selectWindow(“HyperStack”);
Stack.setFrame(3);
run(“Paste”);
close(“density0.tif”);
open(anSubdir+“density”+(c-2)+".tif");
selectWindow(“density”+(c-2)+".tif");
run(“Select None”);
run(“Copy”);
selectWindow(“HyperStack”);
Stack.setFrame(4);
run(“Paste”);
close(“density0.tif”);
run(“Make Montage…”, “columns=2 rows=2 scale=1 first=1 last=4 increment=1 border=0 font=12”);
selectWindow(“Montage”);
saveAs(“tiff”,anSubdir+“Montage”);
run(“Close All”);
}
///////////////////////////////
////////INSIDIA PART 6/////////
////////OUTPUT////////////////
/////////////////////////////
for(G=0; G<nfolder;G++){
anSubdir=analysisdir+mainlist[G];}
print(“This macro has been run on “+dayOfMonth+”/”+month+1+"/"+year+" at “+hour+”:"+minute+" with");
if (mode[0]==true){
print(“thresholded images.”);
} else
{
print(“unthresholded images.”);
}
print(“The pixel value conversion used is “+pixel);
print(“SS Parameters”);
print(”\file AreaTotal Perimeter MaxRadius MinRadius Circularity RadiusE SpecificSurf ShapeF EnvArea “);
for (b=0; b<tof; b++){
////////pixel conversion////////
///SS parameters///////
coordinates[b]=maxRadius[b];
maxRadius[b]=maxRadius[b]*pixel;
minRadius[b]=minRadius[b]*pixel;
RadiusE[b]=RadiusE[b]*pixel;
AreaTotal[b]=AreaTotal[b]*pixel;
Perimeter[b]=Perimeter[b]*pixel;
EnvArea[b]=EnvArea[b]pixel;
SpecSurf[b]=(Perimeter[b]/AreaTotal[b])/(2/maxRadius[b]);
ShapeF[b]=(Perimeter[b]Perimeter[b])/(4PI
AreaTotal[b]);
/////density profile parameters////
RadiusCoreII[b]=RadiusCoreII[b]*pixel;
////density map parameters///////
AreaCore[b]=AreaCore[b]*pixel;
PeriMap[b]=PeriMap[b]*pixel;
AreaInvasion[b]=AreaInvasion[b]*pixel;
PercCore[b]=(AreaCore[b]/AreaTotal[b])*100;
PercInvasion[b]=(AreaInvasion[b]/AreaTotal[b])*100;
print(printnames[b]+” “+AreaTotal[b]+” “+Perimeter[b]+” “+maxRadius[b]+” “+minRadius[b]+” “+circularity[b]+” “+RadiusE[b]+” “+SpecSurf[b]+” “+ShapeF[b]+” “+EnvArea[b]);
}
b=0;
print(“DM and DP parameters”);
print(”\file PeriMap AreaCore AreaInvasion %Core %Invasion ACMTotal ACMCore ACMInvasion %ACMcore %ACMinvasion RadiuscoreII”);
for (b=0; b<tof; b++){
print(printnames[b]+" “+PeriMap[b]+” “+AreaCore[b]+” “+AreaInvasion[b]+” “+PercCore[b]+” “+PercInvasion[b]+” “+ACMtotal[b]+” “+ACMcore[b]+” “+ACMinvasion[b]+” “+ACMpercCore[b]+” “+ACMpercInvasion[b]+” "+RadiusCoreII[b]);
}
///search for largest maxradius and print x coordinates for profiles, if conversion is not selected values are in pixel
largR=0;
for(iii=0; iii<tof; iii++){
current=coordinates[iii]; ///in pixel
if(current>largR){
largR=current;
}}
XCoord=newArray(round(largR));
print(f,“X coordinates”);
for(i=0;i<XCoord.length; i++){
XCoord[i]=(1+i)*pixel;
print(f,XCoord[i]);
}
////////////////////////////////
/////////CLOSE&EXIT////////////
//////////////////////////////
setBatchMode(false);
selectWindow(“aaaResults”);
run(“Close”);
selectWindow(“Log”);
saveAs(“Text”, analysisdir+“output”);
run(“Close”);
selectWindow(title1);
saveAs(“Text”, analysisdir+“Profiles”);
run(“Close”);
waitForUser(“Finish”,“Click OK to exit”);
exit();
/////////////////////////////////////
////////////////////////////////////
///////////////////////////////////