Skip to main content
. 2020 Nov 12;14:582385. doi: 10.3389/fnbot.2020.582385

Algorithm 1.

Construct Voxel-Bounding Box

Input : M(t) − n-frame voxel model
Output : B(t) − n-frame modified-bounding box
1: for MiM(t) do
2: Set the probability of each voxel in Mi to 1
3: Calculate the length, width, and height of the bounding box of Mi as: LMiL, WMiW, HMiH
4: end for
5: Search for the maximum value of length, width and height respectively as Lmax, Wmax, Hmax, to form a template-bounding box B
6: Divide B into space units that decided by the resolution of each voxel
7: for MiM(t) do
8: Compare the template-bounding box B and Mi to obtain their intersections. In template-bounding box B, set the probability of the intersection voxels to 1 and set those of the rest voxels in to 0, to obtain the modified bounding box Bi
9: end for