Updating for distance transform