View source: R/mni_to_region_name.R
mni_to_region_name | R Documentation |
Input an MNI coordinate, output the corresponding AAL/BA brain region name.
mni_to_region_name(x, y, z, distance = T, template = c("aal", "ba"))
x |
The numeric x value of the MNI coordinate. |
y |
The numeric y value of the MNI coordinate. |
z |
The numeric z value of the MNI coordinate. |
distance |
A logical value which indicates whether the closest region
should be shown when there is no exact match ( |
template |
A character vector which indicates the templates to use
( |
If distance mode is on (distance = T
),
output a list of brain region names along with the corresponding distances (mm).
Please set distance = T
if you want the closest region name even when
there is no exact matching brain region.
If distance mode is off (distance = F
),
output a string of region names only when available,
otherwise output 'NULL'.
region_name_to_mni
show_cluster_composition
# Exact matching brain region with distance mode on
mni_to_region_name(26, 0, 0, distance = TRUE)
# Exact matching brain region with distance mode off (much faster)
mni_to_region_name(26, 0, 0, distance = FALSE)
# No exact matching brain region with distance mode on (output the nearest brain region name)
mni_to_region_name(0, 0, 0, distance = TRUE)
# No exact matching brain region with distance mode off (output nothing)
mni_to_region_name(0, 0, 0, distance = FALSE)
# Only acquire AAL region name
mni_to_region_name(26, 0, 0, distance = TRUE, template = "aal")
# Label multiple MNI coordinates at once
# Three cooridnates: [1, 1, 4], [10, 2, 55] and [-1, 3, -6]
mapply(mni_to_region_name,
x = c(1, 10, -1),
y = c(1, 2, 3),
z = c(4, 55, -6)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.