imagej-ops
imagej-ops copied to clipboard
Connectivity Op should be multithreaded
https://github.com/imagej/imagej-ops/blob/010510b4ccd9a8892ba65c17f3c80459dbc163ca/src/main/java/net/imagej/ops/topology/eulerCharacteristic/EulerCharacteristic26NFloating.java#L223
This loop runs in a single thread, but could easily be multithreaded via a multithreading class or parallel Streams. BoneJ1 used a multithreading class where each thread iterated over z slices, getting the next z slice index from an AtomicInteger and summing the threads' sums at the end.
https://github.com/bonej-org/bonej/blob/master/src/org/doube/bonej/Connectivity.java