A level-set algorithm for front propagation in the presence of obstacles