Batch Process Subfolders with individual Results

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

Batch Process Subfolders with individual Results

Annie Muske-Dukes
I want to run the same imaging process and analyze particles on multiple samples that were collected over a timecourse experiment, but I want to keep the results from each day and sample separate so I can compare the change over time and between samples.

I've tried to use the BatchProcessMacro here: http://rsb.info.nih.gov/ij/macros/BatchProcessFolders.txt but that simply makes one long results file and since all the images have the same names (and hence the same label field) I can't determine the source of each particle.

The data is organized as below, due to the instrument's proprietary software the names of the images are the same each day.:

Experiment folder/Day1/Sample1/images
Experiment folder/Day1/Sample2/images
etc.

In total I have 13 samples over 8 days with 200 images each. Currently I am running the batch process:macro folder by folder (Input: Experiment folder/Day1/Sample1/images Output:Experiment folder/Day1/Sample1/images_output/resultsinthisfolder). But this results in a lot of downtime while I wait for each folder to be processed.

Is there a way to modify that code to make a new results file for each loop? I'm not familiar enough with macros to understand where to place the line to save the results file.

Alternatively, if there is a way to append a filepath column to the results table or change the label column to be the filepath instead that would solve my issue. The folders are named with date and sample IDs that would tell me what I need.

Thanks very much for any help.

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

Re: Batch Process Subfolders with individual Results

G. Esteban Fernandez
Try path=getDirectory("image") to get the path to the active image. There's
also a getPath function that will work, might be File.getPath(). Then use
setResult("Label", row, path) to change the Results table to print the
path; row is an integer that refers to the row in the Results table you
want to modify. You must first activate the option to print the Label, in
Analyze > Set Measurements, for this to work.

-Esteban

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