Minimal-Delay Distance Transform for Neighborhood-Sequence Distances in 2D and 3D