Login  Register

Programming Question

Posted by David Webster on Apr 04, 2009; 4:24am
URL: http://imagej.273.s1.nabble.com/Programming-Question-tp3693097.html

All,

I have a question about how ImageJ/Java passes computational results out
of a method. For example, the GaussianBlur class contains the void method
blurFloat with an argument ImageProcessor ip. In this method, the pixels
values in ip are copied into a float array using (float[]) pixels = (float
[]) ip.getPixels(). The array pixels is then used in subsequent
computations. But, I don’t see how the final results are communicated back
to ip as there is no ip.setPixels() in this method. I see this many places
and know its some sort of OOP thing, but I can’t figure it out. Can
someone tell me how ip gets the updated pixel values.

David Webster