Login  Register

Passing variable to a command

Posted by Pedro J CamelloDr Pedro J Camello on Oct 10, 2014; 8:05pm
URL: http://imagej.273.s1.nabble.com/Passing-variable-to-a-command-tp5009999.html

Hi all,

within a macro, I would like to pass a string to a command call.

I want to open hundreds of images (stored in a folder) as a stack using the File>Import>Sequence command. I would like the macro to open the series without waiting mi manual input in the corresponding  "File name contains" box.

This is the code:

filenameroot = "18OCT12_261";//This is a typical wild card for the names of my files

run("Image sequence...", "file =\filenameroot sort");

If write the string 18OCT12_261  instead the variable name it works.

What am I doing wrong?

Thanks in advance

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