Description Usage Arguments Details Value Examples

The function `approx_tensors`

is the analog to the
`approx`

function for interpolating
`tensor`

-valued data.

1 2 | ```
approx_tensors(x, tensors, xout, method = "linear", n = 50, yleft,
yright, rule = 1, ties = mean)
``` |

`x` |
Numeric vector specifying the locations at which tensors are defined. |

`tensors` |
List of |

`xout` |
An optional set of numeric values specifying where interpolation is to take place. |

`method` |
Specifies the interpolation method to be used. Choices are "linear" [default] or "log" for interpolating in the log-Euclidean space. |

`n` |
If |

`yleft` |
The value to be returned when input |

`yright` |
The value to be returned when input |

`rule` |
An integer (of length 1 or 2) describing how interpolation is to
take place outside the interval |

`ties` |
Handling of tied |

If `method == "linear"`

, it performs linear tensor interpolation
according to the paper by Gahm, J. K., Wisniewski, N., Kindlmann, G., Kung,
G. L., Klug, W. S., Garfinkel, A., & Ennis, D. B. (2012, October). Linear
invariant tensor interpolation applied to cardiac diffusion tensor MRI. In
International Conference on Medical Image Computing and Computer-Assisted
Intervention (pp. 494-501). Springer, Berlin, Heidelberg. If ```
method ==
"log"
```

, it performs log-Euclidean tensor interpolation according to the paper
by Arsigny, V., Fillard, P., Pennec, X. and Ayache, N. (2006) ‘Log-Euclidean
metrics for fast and simple calculus on diffusion tensors.’, Magnetic
resonance in medicine : official journal of the Society of Magnetic Resonance
in Medicine / Society of Magnetic Resonance in Medicine, 56(2), pp. 411–21.
doi: 10.1002/mrm.20965.

A `list`

with components `x`

and `y`

, containing
`n`

coordinates which interpolate the given data points according to
the `method`

(and `rule`

) desired.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ```
theta <- c(0, pi/6, pi/4, pi/3, pi/2)
R <- NULL
for (i in seq_along(theta)) {
th <- theta[i]
R[[i]] <- cbind(
c(cos(th), sin(th), 0),
c(-sin(th), cos(th), 0),
c(0, 0, 1)
)
}
L <- diag(c(1.7, 0.3, 0.1))
D <- purrr::map(R, ~ . %*% L %*% t(.))
s <- seq(0, 1, length.out = length(theta))
approx_tensors(s, D)
approx_tensors(s, D, method = "log")
``` |

astamm/fdatractography documentation built on May 12, 2019, 5:37 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.