Spinal curvature measurement by tracked ultrasound snapshots