Add Image File Name to Results

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Add Image File Name to Results

mswells
This post has NOT been accepted by the mailing list yet.
I am new to imageJ, and would like to add my the image file name to the results. Here is my code. The bolded text I found on this site.

Thank you in advance,

Scotty


temp = getInfo("image.filename");
run("Color Threshold...");
min=newArray(3);
max=newArray(3);
filter=newArray(3);
a=getTitle();
run("HSB Stack");
run("Convert Stack to Images");
selectWindow("Hue");
rename("0");
selectWindow("Saturation");
rename("1");
selectWindow("Brightness");
rename("2");
min[0]=40;
max[0]=255;
filter[0]="pass";
min[1]=64;
max[1]=255;
filter[1]="pass";
min[2]=51;
max[2]=255;
filter[2]="pass";
for (i=0;i<3;i++){
  selectWindow(""+i);
  setThreshold(min[i], max[i]);
  run("Convert to Mask");
  if (filter[i]=="stop")  run("Invert");
}
imageCalculator("AND create", "0","1");
imageCalculator("AND create", "Result of 0","2");
for (i=0;i<3;i++){
  selectWindow(""+i);
  close();
}
selectWindow("Result of 0");
close();
selectWindow("Result of Result of 0");
rename(a);
// Colour Thresholding-------------
run("Despeckle");
run("Remove Outliers...", "radius=15 threshold=1000 which=Bright");
run("Measure");
temp2 = getTitle();
run("Merge Channels...", "c1=["+temp2+"] c4=["+temp+"] create keep");

close()
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Add Image File Name to Results

mswells
This post has NOT been accepted by the mailing list yet.
I ran it with and without the close() at the end. I get the area results I want, but still no image file name as a column.

Scotty
Loading...