Re: Calculating atan2 on pixels from two input images in a macro
Posted by
Gabriel Landini on
Aug 21, 2014; 9:21am
URL: http://imagej.273.s1.nabble.com/Calculating-atan2-on-pixels-from-two-input-images-in-a-macro-tp5007758p5009286.html
On Thursday 21 Aug 2014 01:54:24
[hidden email] wrote:
> for (y=0; y<height; y++) {
> for (x=0; x<width; x++) {
> value = 0.5*Math.atan2
> (ipU.getPixelValue(x,y),
> ipQ.getPixelValue(x,y));
> newIp.putPixelValue(x,y,value);
> }
> }
If you are looking for speeding it up further, it is probably quicker if you
processed the images as a unidimensional arrays.
Cheers
Gabriel
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html