In our BigStitcher and corresponding newer versions of SPIM_Registration, @StephanPreibisch and I create large virtual RAIs, that we wish to display as plain-old ImagePluss. Since the virtual fusion of every plane can be quite computationally intensive, doing it multi-threaded provides a great speed improvement (and a more responsive user experience).
To achieve this, we wrote MultithreadedIterableIntervalProjector2D, a multi-threaded version of IterableIntervalProjector2D.
We overload the constructors of ImageJVirtualStack and subclasses to take an additional ExecutorService. This may be null, in which case the "old" IterableIntervalProjector2D is used. The old constructors default to single-threaded behaviour.
The same goes for the RAI -> ImagePlus methods in ImageJFunctions: we provide versions that take an ExecutorService and use it to perform multi-threaded plane filling. The old signatures provide unchanged, single-threaded beahviour.
In our BigStitcher and corresponding newer versions of SPIM_Registration, @StephanPreibisch and I create large virtual RAIs, that we wish to display as plain-old
ImagePlus
s. Since the virtual fusion of every plane can be quite computationally intensive, doing it multi-threaded provides a great speed improvement (and a more responsive user experience).To achieve this, we wrote
MultithreadedIterableIntervalProjector2D
, a multi-threaded version ofIterableIntervalProjector2D
. We overload the constructors ofImageJVirtualStack
and subclasses to take an additionalExecutorService
. This may be null, in which case the "old"IterableIntervalProjector2D
is used. The old constructors default to single-threaded behaviour. The same goes for the RAI -> ImagePlus methods inImageJFunctions
: we provide versions that take anExecutorService
and use it to perform multi-threaded plane filling. The old signatures provide unchanged, single-threaded beahviour.