imagej/imglib — pull request #46 by tinevez (2013-12-03 12:12:42+00:00)
Title: fft2 package has some methods that are silently multithreaded. Enforce nThreads specification

For instance, FFTConvolution uses as many threads as reported by Runtime.getAvailableProcessors(). The number of threads it uses cannot be configured. This is a problem for callers that are themselves working in a multithreaded way.

This pull request proposes a fix by
- Forcing all FFTMethods to specify the number of threads to use (adding an int parameter everywhere). The backing FFT class already supports this syntax.
- Making FFTConvolution implements MultiThreaded.

I checked that the calls to FFT methods actually respects the default, but would appreciate a review by the author. :) @StephanPreibisch