Automatic identification of the boundaries of significant structure (segmentation) within a medical image is an are of ongoing research. Various approaches have been proposed but only two methods have achieved widespread use: manual delineation of boundaries and segmentation using intensity values. In this paper we describe an approach based on image registration. A reference image is prepared and segmented, by hand or otherwise. A patient image is registered to the reference image and the mapping then applied to ther reference segmentation to map it back to the patient image. In general a high-resolution nonlinear mapping is required to achieve accurate segmentation. This paper describes an algorithm that can efficiently generate such mappings, and outlines the uses of this tool in two relevant applications. An important feature of the approach described in this paper is that the algorithm is independent of the segmentation problem being addresses. All knowledge about the problem at hand is contained in files of reference data. A secondary benefit is that the continuous three-dimensional mapping generated is well suited to the generation of patient-specific numerical models (e.g. finite element meshes) from the library models. Smoothness constraints in the morphing algorithm tend to maintain the geometric quality of the reference mesh.