fixed bug: the last section of each segment was not added to segment
made the initial distance check 0.5 smaller and changed the distance calculation to use benefit on voxels between the cross sections