Re: run("Set Mearsurements...... How to pass a variable
Posted by
Ben Tupper on
Oct 27, 2008; 11:59am
URL: http://imagej.273.s1.nabble.com/run-Set-Mearsurements-How-to-pass-a-variable-tp3694651p3694652.html
On Oct 27, 2008, at 7:22 AM, Guy Mayor wrote:
> Hello,
>
> I am writing a bach macro that process all images in a folder or a
> tree of
> folders. I would like to iteratively use a
>
> run("Set Measurements...", "area mean standard modal min perimeter fit
> circularity feret's integrated redirect=None decimal=0");
>
> followed by several
>
> run("Distribution...", "parameter=Area or=50 and=2");
> run("Distribution...", "parameter=Feret or=50 and=2");
> ....
>
> To generate several distribution pictures for each processed picture
>
> I have not been able to find a correct syntaxe to assigne
> "redirect=imagename" to a variable (the changing image name). I can
> only
> pass "None" or the name of an open image in the popup menu
>
Hi,
You should be able to split the string and insert you image name.
Something like the following...
run("Set Measurements...", "area mean standard modal min perimeter fit
circularity feret's integrated redirect=" + myImageName +" decimal=0");
Cheers,
Ben
> Is it any way to pass a variable in this setup?
>
> If not, how could I achieve this goal at macro level?
>
>
> Thanks for any help or suggestion
>
>
> Guy Mayor