Posted by
Aryeh Weiss on
Aug 06, 2015; 3:59am
URL: http://imagej.273.s1.nabble.com/Batch-processes-through-plugins-tp5013914p5013917.html
On 8/5/15 10:34 PM, jswalker wrote:
> Hi all,
>
> I'm trying to do a couple operations on many files in a folder, but these
> operations must be done through plugins (eg BioFormats, or ND2Reader).
>
> The recorder spits this out:
>
> run("Bio-Formats Importer", "open=[C:\\file\\path\\file.tif]
> insertoptionshere");
>
> How do I make this perform the same action on all files in a list? I
> understand how to do this when I'm not doing it through a plugin -- my
> question is specifically about doing this within the plugin syntax shown
> above.
You can get your file list and insert the string variables into the
argument string, Here is an example from something I wrote:
run("Bio-Formats Importer", "open=["+inputPath+"] autoscale
color_mode=Default view=Hyperstack stack_order=XYCZT series_"+d2s(j,0));
your argument list will look different, but the idea is the same. In my
example, I have variable for the input path (a complete path to my
file). Since I needed to loop over a set of fields in a multifield
image, I also have "series_"+d2s(j,0) which constructs the correct
argument to get a particular field (i is a loop variable)
hope this helps
--aryeh
--
Aryeh Weiss
Faculty of Engineering
Bar Ilan University
Ramat Gan 52900 Israel
Ph: 972-3-5317638
FAX: 972-3-7384051
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html