Made clamp locally available. Swapped order of arguments.
Default type
Matrix with 1s
Dilation filter
Erode and dilation, without code duplication.
Control spacing via dilation filter