seung-lab / connected-components-3d

Connected components on discrete and continuous multilabel 3D & 2D images. Handles 26, 18, and 6 connected variants; periodic boundaries (4, 8, & 6)
GNU Lesser General Public License v3.0
367 stars 43 forks source link

feat: two decision tree tweaks #10

Closed william-silversmith closed 5 years ago

william-silversmith commented 5 years ago

Two optimizations.

1) Try the following decision tree:

not B, D, F not B, D, not F, C, I not B, H, A, C

Versus:

not B, H not B, not H, A, C not B, not H, D, F not B not H, D, not F, C, I

2) Use redundancy from voxels A, C, D, and F which reduces the full WOS mask. Previously we exploited voxels E and B which eliminate the need for the full 2D check. A and D make it so that only L needs checking. C and F make it so that only J and M need to be checked.

william-silversmith commented 5 years ago

Seems like it might be about 5% faster on SNEMI3D.