baby.volume.my_ball

baby.volume.my_ball(radius)

Generates a ball-shaped structuring element.

This is the 3D equivalent of a disk. A pixel is within the neighborhood if the Euclidean distance between it and the origin is no greater than radius.

Parameters
radiusint

The radius of the ball-shaped structuring element.

Returns
selemndarray

The structuring element where elements of the neighborhood are 1 and 0 otherwise.

Other Parameters
dtypedata-type

The data type of the structuring element.