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

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

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

OBEID Patricia 154904
Dear all,
Since few days, the column < slice > from window < Summary > and < label > from window < Results > stay empty.
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
Reply | Threaded
Open this post in threaded view
|

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

Michael Schmid-3
Hi Patricia,

Maybe your images have only one slice?

If there is only one slice, the 'label' comes from the title of the
image. With
   run("Duplicate...", "title=[] use");
you specify that the title is blank.

If there are several slices, the label (and the 'slice' column of the
Summary) comes from the slice name; if it is empty it indicates that the
slice names are empty. You can see the slice names below the title bar
of an image, e.g.
   5/15 (mySliceNameFive); 512x512 pixel; 8-bit

Anyhow, I don't understand why you duplicate the images in the macro;
even if you modify them with "Convert to Mask", nothing will happen to
the image files as long as you don't save the modified images.

I also don't understand why you measure 'mean' and 'min' after "Convert
to Mask". After that step, the particles have a uniform pixel value of
255. If you want to measure the mean and min pixel values of your
particles, run "Analyze Particles" on the thresholded image, not on the
mask.

Michael
________________________________________________________________
On 25/10/18 13:46, OBEID Patricia 154904 wrote:

> Dear all,
> Since few days, the column < slice > from window < Summary > and < label > from window < Results > stay empty.
> 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
Reply | Threaded
Open this post in threaded view
|

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

OBEID Patricia 154904
Thank you Michael,
I am well aware of everything you list but the problem is recent (less than a month).
I want to attach 2 images for test but I do not know how to do? It's about counting the nuclei.

You wrote "I also do not understand why you measure 'mean' and 'min' after" Convert to Mask. "After that step, the particles have a uniform pixel value of 255. If you want to measure the mean and min pixel Rating of your particles, run "Analyze Particles" on the thresholded image, not on the mask. "
I'm doing this because I only want to record the number of nuclei. The intensities are not useful to me.

Thanks again
Patricia

-----Message d'origine-----
De : ImageJ Interest Group <[hidden email]> De la part de Michael Schmid
Envoyé : jeudi 25 octobre 2018 14:12
À : [hidden email]
Objet : Re: problem with summary and results windows : "slice" and "label" not appear

Hi Patricia,

Maybe your images have only one slice?

If there is only one slice, the 'label' comes from the title of the image. With
   run("Duplicate...", "title=[] use");
you specify that the title is blank.

If there are several slices, the label (and the 'slice' column of the
Summary) comes from the slice name; if it is empty it indicates that the slice names are empty. You can see the slice names below the title bar of an image, e.g.
   5/15 (mySliceNameFive); 512x512 pixel; 8-bit

Anyhow, I don't understand why you duplicate the images in the macro; even if you modify them with "Convert to Mask", nothing will happen to the image files as long as you don't save the modified images.

I also don't understand why you measure 'mean' and 'min' after "Convert to Mask". After that step, the particles have a uniform pixel value of 255. If you want to measure the mean and min pixel values of your particles, run "Analyze Particles" on the thresholded image, not on the mask.

Michael
________________________________________________________________
On 25/10/18 13:46, OBEID Patricia 154904 wrote:

> Dear all,
> Since few days, the column < slice > from window < Summary > and < label > from window < Results > stay empty.
> 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

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

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

Philippe CARL
Dear Patricia,

> I am well aware of everything you list but the problem is recent (less than a month).

Did you try to make "inverse updates" of your ImageJ software by doing "Help->Update ImageJ..." and choosing an older version to check whether your code is working as you expect it with older installs?
And if the outcome is not positive, then your issue is not due to an ImageJ update, but maybe either your data or different options settings.
My best regards,
Philippe

-----Message d'origine-----
De : ImageJ Interest Group [mailto:[hidden email]] De la part de OBEID Patricia 154904
Envoyé : jeudi 25 octobre 2018 14:41
À : [hidden email]
Objet : Re: problem with summary and results windows : "slice" and "label" not appear

Thank you Michael,
I am well aware of everything you list but the problem is recent (less than a month).
I want to attach 2 images for test but I do not know how to do? It's about counting the nuclei.

You wrote "I also do not understand why you measure 'mean' and 'min' after" Convert to Mask. "After that step, the particles have a uniform pixel value of 255. If you want to measure the mean and min pixel Rating of your particles, run "Analyze Particles" on the thresholded image, not on the mask. "
I'm doing this because I only want to record the number of nuclei. The intensities are not useful to me.

Thanks again
Patricia

-----Message d'origine-----
De : ImageJ Interest Group <[hidden email]> De la part de Michael Schmid
Envoyé : jeudi 25 octobre 2018 14:12
À : [hidden email]
Objet : Re: problem with summary and results windows : "slice" and "label" not appear

Hi Patricia,

Maybe your images have only one slice?

If there is only one slice, the 'label' comes from the title of the image. With
   run("Duplicate...", "title=[] use");
you specify that the title is blank.

If there are several slices, the label (and the 'slice' column of the
Summary) comes from the slice name; if it is empty it indicates that the slice names are empty. You can see the slice names below the title bar of an image, e.g.
   5/15 (mySliceNameFive); 512x512 pixel; 8-bit

Anyhow, I don't understand why you duplicate the images in the macro; even if you modify them with "Convert to Mask", nothing will happen to the image files as long as you don't save the modified images.

I also don't understand why you measure 'mean' and 'min' after "Convert to Mask". After that step, the particles have a uniform pixel value of 255. If you want to measure the mean and min pixel values of your particles, run "Analyze Particles" on the thresholded image, not on the mask.

Michael
________________________________________________________________
On 25/10/18 13:46, OBEID Patricia 154904 wrote:

> Dear all,
> Since few days, the column < slice > from window < Summary > and < label > from window < Results > stay empty.
> 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

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

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

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

Wayne Rasband-2
In reply to this post by OBEID Patricia 154904
> 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