Login  Register

Re: problem with summary and results windows : "slice" and "label" not appear

Posted by Wayne Rasband-2 on Oct 25, 2018; 5:10pm
URL: http://imagej.273.s1.nabble.com/problem-with-summary-and-results-windows-slice-and-label-not-appear-tp5021348p5021355.html

> On Oct 25, 2018, at 7:46 AM, OBEID Patricia 154904 <[hidden email]> wrote:
>
> Dear all,
> Since few days, the column < slice > from window < Summary > and < label > from window < Results > stay empty.

Hi Patricia,

For single images, the “Slice” column in the “Summary” table contains the image names, which your macro sets blank. Here is simplified and runnable version of your macro that creates a “Summary” table with the image names in the “Slice” column:

  close("*");
  setBatchMode(true);
  run("Set Measurements...", "area mean standard min display");
  for (i=0; i<10; i++) {
     run("Boats (356K)");
     run("Gaussian Blur...", "sigma=&i");
     rename(getTitle()+"-"+(i+1));
     run("Set Scale...", "distance=0 known=0 pixel=1 unit=pixel");
     setAutoThreshold("Li dark");
     run("Analyze Particles...", "size=20-200 pixel summarize");
     run("Close All");
   }

Here is what the “Summary” table created by this macro looks like:

Slice        Count Area  Average %Area  Mean
boats.gif-1   20  1314    65.700   0.317   101.779
boats.gif-2   12  960      80.000   0.231   97.328
boats.gif-3   8   842      105.250  0.203   93.465
boats.gif-4   7   758      108.286  0.183   91.026
boats.gif-5   5   427      85.400    0.103   89.185
boats.gif-6   2   133      66.500    0.032   89.240
boats.gif-7   0   0          NaN        0.000   NaN
boats.gif-8   3   461      153.667  0.111   92.543
boats.gif-9   5   380      76.000    0092    90.850
boats.gif-10 0   0          NaN        0.000   NaN

-wayne






> I use macros that I run regularly and that did not pose a problem
> Today these columns remain empty.
> I am using version 1.52h
> Here is my macro:
>
> dir = getDirectory("Choose a Directory ");
> dir2 = getDirectory("Choose Destination Directory ");
>
> list = getFileList(dir);
> setBatchMode(true);
> for (i=0; i<list.length; i++) {
>                if (endsWith(list[i], "d0.C01")){
>                path = dir+list[i];
>                open(path);
>                                               run("Duplicate...", "title=[] use");
>                                               run("Set Scale...", "distance=0 known=0 pixel=1 unit=pixel");
>                                               run("Set Measurements...", "area mean standard min display redirect=None decimal=2");
>                                               setAutoThreshold("Li dark");
>                                               run("Convert to Mask");
>                                               run("Analyze Particles...", "size=20-200 pixel circularity=0.00-1.00 show=Nothing display summarize add");
>
> run("Close All");
> if (roiManager("count")>0) roiManager("reset");
>
> }
>                               }
>
>                selectWindow("Summary");
>                saveAs("Text",dir2+"Comptage.xls");
>                run("Close");
> ........................................................................................................................
> I can not identify where the problem is.
> Thank you for your help
> Patricia
>
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html