Embodiments described herein include apparatus that includes an electrical interface and a processor. The processor is configured to receive, via the electrical interface, a first signal that indicates a time-varying force that was applied to a portion of tissue, and one or more second signals that are derived from ultrasound reflections received from the portion of tissue. The processor is further configured to learn, from the first signal and the second signals, a dependency of a thickness of the portion of tissue on the force applied to the portion of tissue. Other embodiments are also described.