Re: 8-bit vs 16-bit ip.set() and ip.get() speed
Posted by
Michael Doube on
Dec 03, 2009; 3:06pm
URL: http://imagej.273.s1.nabble.com/8-bit-vs-16-bit-ip-set-and-ip-get-speed-tp3690234p3690236.html
Albert,
Thanks for the excellent suggestion. By caching as you suggest, 8-bit
processing is now much faster...
ImageProcessor[] sliceProcessors = new ImageProcessor[d + 1];
for (int z = 1; z <= d; z++) {
sliceProcessors[z] = sourceStack.getProcessor(z);
}
then in the inner loop...
targetIP.set(x, y, sliceProcessors[zA].get(xA, yA));
Michael
Albert Cardona wrote: