Re: variable in "Remove slices..."
Posted by
Gluender-2 on
Jan 26, 2009; 5:55pm
URL: http://imagej.273.s1.nabble.com/Re-variable-in-Remove-slices-tp3693917p3693922.html
>Hi all,
>
> I am using the "Remove slcies..." function in a macro, and I would
>like to be able to set the first and last images using variables.
>If I use the methods below... not problems:
>run("Remove Slices...", "first=1 last=15 increment=2");
>
>but I would like to be able to set first=X and last=Y dynamically to
>make the macro more robust., unfornuately the following doesn't work.
>a = X
>b = Y
>run("Remove Slices...", "first=a last=b increment=2"); // where a
>and b are integer variables.
>
>Is this not possible, or have I just messed up with my syntax?
>
>Cheers,
>Damon
Just think of string/variable-combinations...
run("Remove Slices...", "first=" + X + " last=" + Y + " increment=2")
Watch the necessary blanks!
HTH
--
Herbie
------------------------
<
http://www.gluender.de>