PT - JOURNAL ARTICLE AU - Michael Doube TI - Multithreaded two-pass connected components labelling and particle analysis in ImageJ AID - 10.1101/2020.02.28.969139 DP - 2020 Jan 01 TA - bioRxiv PG - 2020.02.28.969139 4099 - http://biorxiv.org/content/early/2020/03/25/2020.02.28.969139.short 4100 - http://biorxiv.org/content/early/2020/03/25/2020.02.28.969139.full AB - Sequential region labelling, also known as connected components labelling, is a standard image segmentation problem that joins contiguous foreground pixels into blobs. Despite its long development history and widespread use across diverse domains such as bone biology, materials science, and geology, connected components labelling can still form a bottleneck in image processing pipelines. Here, I describe a multithreaded implementation of classical two-pass sequential region labelling and introduce an efficient collision resolution step, ‘bucket fountain’. Code was validated on test images and against commercial software (Avizo). It was performance tested on images from 2 MB (161 particles) to 6.5 GB (437,508 particles) to determine whether theoretical linear scaling (O(n)) had been achieved, and on 1 – 40 CPU threads to measure speed improvements due to multithreading. The new implementation achieves linear scaling (b = 0.918 – 1.068, time ∝ pixelsb; R2 = 0.985 – 0.998), which improves with increasing thread number up to 8-10 threads, suggesting that it is memory bandwidth limited. This new implementation of sequential region labelling reduces the time required from hours to a few tens of seconds for images of several GB, and is limited only by hardware scale. It is available open source and free of charge in BoneJ.