Navigation

Operators and Keywords

Function List:

C++ API

Function File: d = ls_init_narrowband (phi, h = 1)

Calculate the estimated distances of grid points in the “narrow band” to the zero level-set of phi. The points considered are those which have neighbours with different sign of phi. The calculated distances are returned in d, where values for points not in the narrow band are set to NA. If the optional argument h is given, it is used as the grid spacing instead of the default value of 1.

The distances will be positive or negative depending on the sign of phi. This means that d gives the signed distance function of the level-set domain for narrow-band points.

We assume a linear model for phi, meaning that the approximate intersection points on grid edges are calculated using linear interpolation. The distances at narrow-band points are calculated using the quadratic update equation of the Fast-Marching Method using these approximated intersection points.

Note that this method does not take an arbitrary speed field into account. It assumes a uniform speed of 1 everywhere. For different speeds, the resulting distances must be scaled as required.

It may be a good idea to use ls_normalise on the level-set function before using this method, to prevent almost-zero values from underflowing due to the performed calculations.

See also: ls_signed_distance, ls_nb_from_geom, ls_normalise.

Package: level-set