  We present an accurate and robust numerical method to track quantized vortex
lines in a superfluid described by the Gross-Pitaevskii equation. By utilizing
the pseudo-vorticity field of the associated complex scalar order parameter of
the superfluid, we are able to track the topological defects of the superfluid
and reconstruct the vortex lines which correspond to zeros of the field.
Throughout, we assume our field is periodic to allow us to make extensive use
of the Fourier representation of the field and its derivatives in order to
retain spectral accuracy. We present several case studies to test the precision
of the method which include the evaluation of the curvature and torsion of a
torus vortex knot, and the measurement of the Kelvin wave spectrum of a vortex
line and a vortex ring. The method we present makes no a-priori assumptions on
the geometry of the vortices and is therefore applicable to a wide range of
systems such as a superfluid in a turbulent state that is characterised by many
vortex rings coexisting with sound waves. This allows us to track the positions
of the vortex filaments in a dense turbulent vortex tangle and extract
statistical information about the distribution of the size of the vortex rings
and the inter-vortex separations. In principle, the method can be extended to
track similar topological defects arising in other physical systems.
