  Triangulations are an ubiquitous input for the finite element community.
However, most raw triangulations obtained by imaging techniques are unsuitable
as-is for finite element analysis. In this paper, we give a robust pipeline for
handling those triangulations, based on the computation of a one-to-one
parametrization for automatically selected patches of input triangles, which
makes each patch amenable to remeshing by standard finite element meshing
algorithms. Using only geometrical arguments, we prove that a discrete
parametrization of a patch is one-to-one if (and only if) its image in the
parameter space is such that all parametric triangles have a positive area. We
then derive a non-standard linear discretization scheme based on mean value
coordinates to compute such one-to-one parametrizations, and show that the
scheme does not discretize a Laplacian on a structured mesh. The proposed
pipeline is implemented in the open source mesh generator Gmsh, where the
creation of suitable patches is based on triangulation topology and
parametrization quality, combined with feature edge detection. Several examples
illustrate the robustness of the resulting implementation.
