Description Usage Arguments Value Examples
This method provides an easy and natural way to subset a tract
stored in a tract
object, without having to deal with the inner
representation of the tract
class.
1 | simplify_tract(tract, clusters = NULL, validate = TRUE)
|
tract |
The input |
clusters |
A numeric or integer vector giving the cluster membership of
each |
i |
A valid expression to extract subtract with fewer streamlines (could be an integer, a numeric vector, of a logical vector). |
tract |
An object of class |
A tract
with the selected streamlines only.
A tract
.
1 2 3 4 5 6 7 8 9 10 11 12 | file <- system.file("extdata", "Case001_CST_Left.csv", package = "fdatractography")
cst_left <- read_tract(file)
t1 <- cst_left[1]
t2 <- cst_left[1:2]
n <- length(cst_left$data)
selected_streamlines <- sample(c(TRUE, FALSE), n, replace = TRUE)
t3 <- cst_left[selected_streamlines]
Tract Simplification by Cluster Medians
file <- system.file("extdata", "Case001_CST_Left.csv", package = "fdatractography")
cst_left <- read_tract(file)
m <- simplify_tract(cst_left)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.