get_origin: Get the origin of spline data

View source: R/transform.R

get_originR Documentation

Get the origin of spline data

Description

It returns the Cartesian x, y coordinates of the virtual origin of the ultrasonic waves/probe surface (see Details).

Usage

get_origin(data, fan_lines = c(10, 25))

Arguments

data

The spline data (the cartesian coordinates must be in two columns named X and Y).

fan_lines

A numeric vector with two fan lines (the default is c(10, 25)).

Details

The function estimates the origin of the ultrasond waves from the probe using the spline data and the provided fan lines. The estimation method is based on Heyne, Matthias & Donald Derrick (2015) Using a radial ultrasound probe's virtual origin to compute midsagittal smoothing splines in polar coordinates. The Journal of the Acoustical Society of America 138(6), EL509–EL514, DOI:10.1121/1.4937168.

Value

A numeric vector with the Cartesian (x, y) coordinates of the virtual origin of the ultrasonic waves/probe surface.

Origin estimation

The equations of the two fan lines (10 and 25 by default) are set equal to find their intersection. The intersection is the origin. In some cases, the linear estimation of the equation fails, and an error related to fit is returned. In these cases, try different fan lines by increasing the minimum fan line and/or changing the maximum fan line (for example, if c(10, 25) returns an error, try c(15, 30)).


rticulate documentation built on Sept. 4, 2022, 5:07 p.m.