Login  Register

Re: run("Rotate... ") with variable - only works once - why?

Posted by dscho on Mar 04, 2010; 2:02pm
URL: http://imagej.273.s1.nabble.com/run-Rotate-with-variable-only-works-once-why-tp3689122p3689123.html

Hi,

On Thu, 4 Mar 2010, Michael Weber wrote:

> a = getResult("Angle", 0)
> selectWindow("stack")
> run("Rotate... ", "angle=a grid=1 interpolation=Bicubic fill enlarge stack");

The second parameter is a string, but you want to use the _value_ of the
variable "a" rather than the name. So you have to concatenate it:

        "angle=" + a + " grid=1 interpolation=Bicubic fill enlarge stack"

Ciao,
Johannes