Login  Register

Re: entering an equation

Posted by dscho on Jan 20, 2009; 2:45pm
URL: http://imagej.273.s1.nabble.com/entering-an-equation-tp3694011p3694013.html

Hi,

On Tue, 20 Jan 2009, Rasband Wayne wrote:

> ImageJ 1.42h, due next week, will have a Process>Math>Equation command
> where you can enter an equation, such as
>
>   v2=v1-0.6/(0.5*v1+0.3)
>
> that will be applied to all the pixels in the image. This will be
> equivalent to running the macro:
>
>  for (y=0; y<getHeight; y++) {
>    for (x=0; x<getWidth; x++) {
>      v1=getPixel(x,y);
>      v2=v1-0.6/(0.5*v1+0.3)
>      setPixel(x,y,v2)
>    }
>  }

Nice!

Thank you very much,
Dscho