Vortex is a central concept in the understanding of turbulent dynamics. Objective algorithms for the detection and extraction of vortex structures can facilitate the physical understanding of turbulence regeneration dynamics by enabling automated and quantitative analyses of these structures. Despite the wide availability of vortex identification criteria, they only label spatial regions belonging to vortices, without any information on the identity, topology and shape of individual vortices. This latter information is stored in the axis lines lining the contours of vortex tubes. In this study, a new tracking algorithm is proposed which propagates along the vortex axis lines and iteratively searches for new directions for growth. The method is validated in flow fields from transient simulations where vortices of different shapes are controllably generated. It is then applied to statistical turbulence for the analysis of vortex configurations and distributions. It is shown to reliably extract axis lines for complex three-dimensional vortices generated from the walls. A new procedure is also proposed that classifies vortices into commonly observed shapes, including quasi-streamwise vortices, hairpins, hooks and branches, based on their axis-line topology. Clustering analysis is performed on the extracted axis lines to reveal vortex organization patterns and their potential connection to large-scale motions in turbulence.