@LucindaE and I have been attempting to use BoneJ’s Purify command to remove all particles apart from the largest in some 2D images. This typically works well (using the Mapped labelling algorithm), but we have found an example where something unexpected happens:
Apart from removing smaller particles in the example image above, it also removes part on the ends of the largest particle (what is maybe important or not is that the cuts happen at locations where the curve changes direction in a way?):
Purified.tif (3.5 MB)
Translating the Foreground structures (via cut-paste) gives the same result.
We went on to do further tests on a 3D image stack (the example image that started it all + a background slice before and after combined into a stack). This give the same result. Reslicing the image stack gives a different result, but it is also wrong: there are 3 foreground particles remaining after the Purify step, which may be another, unrelated issue?
The issues were reproduced on Windows 10 and Ubuntu 18.04 operating systems on two different machines.
Can anyone think of what might be happening?
PS using a different Purify algorithm results in either a
java.util.concurrentModificationException (linear) or an image with several particles (multi-threaded)