Login  Register

Re: Saving data from each individual image using batch processing

Posted by Rasband, Wayne (NIH/NIMH) [E] on Oct 01, 2014; 9:58pm
URL: http://imagej.273.s1.nabble.com/Saving-data-from-each-individual-image-using-batch-processing-tp5009857p5009859.html

On Oct 1, 2014, at 1:55 PM, longbg wrote:

> Hello Everyone,
>
> I am pretty new with imageJ and am having some issues with what I think
> should be simple tasks. I am working on a program which analyzes droplet
> sizes (I'm working with microfluidics, won't go into much detail there) and
> distances between those droplets in individual images. I have written a
> macro program which affectively analyzes droplet size and gives centroid
> data. However, after batch processing (on average I must analyze ~2000
> images at a time) the summary table only gives me the average droplet size
> for each image. There is also a results table which has individual droplet
> sizes in single images, but this only includes data from the most recent
> image analyzed. Does anyone know how to write a macro program which saves
> results from each individual image and consolidates this data into a single
> document?

The droplet sizes for all the images will be saved in a single results table as long as 'clear' ("Clear results") is missing from the options string of run("Analyze Particles...",options). The file name will be saved in the "Label" column of the results table if "Display label" is checked in the Analyze>Set Results dialog. There is an example below.

-wayne

  run("Set Measurements...", "area mean centroid display decimal=3");
  dir = getDirectory("Choose a Folder");
  list = getFileList(dir);
  run("Clear Results");
  setBatchMode(true);
  for (i=0; i<list.length; i++) {
     open(dir+list[i]);
     setAutoThreshold("Default dark");
     run("Analyze Particles...", "size=100 display");
     close;
  }


> --
> View this message in context: http://imagej.1557.x6.nabble.com/Saving-data-from-each-individual-image-using-batch-processing-tp5009857.html
> Sent from the ImageJ mailing list archive at Nabble.com.

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