Methods and apparatus for treating a patient. The method includes acquiring a plurality of radio frequency (RF) signals with an ultrasound transducer, each RF signal representing one or more return echoes from a scan line of a pulse-mode echo ultrasound scan. A position of the ultrasound transducer corresponding to each of the acquired RF signals is determined, and a plurality of contour lines generated from the plurality of RF signals. The method estimates a 3-D shape and position of an anatomical feature, such as a joint of patient based on the generated contour lines and corresponding ultrasound transducer positions. An apparatus, or computer includes a processor and a memory with instructions that, when executed by the processor, perform the aforementioned method.