pseudo_gravity_packing(im, r, clearance=0, axis=0, max_iter=1000)¶
Iteratively inserts spheres at the lowest accessible point in an image, mimicking a gravity packing.
im (ND-array) – The image controlling where the spheres should be added, indicated by
Truevalues. A common option would be a cylindrical plug which would result in a tube filled with beads.
r (int) – The radius of the spheres to be added
clearance (int (default is 0)) – The abount space to added between neighboring spheres. The value can be negative for overlapping spheres, but abs(clearance) > r.
axis (int (default is 0)) – The axis along which gravity acts.
max_iter (int (default is 1000)) – The maximum number of spheres to add
spheres – An image the same size as
imwith spheres indicated by
True. The spheres are only inserted locations that are
- Return type