View source: R/view_xifti_volume.R
view_xifti_volume | R Documentation |
"xifti"
Visualize the subcortical data in a "xifti"
using a series of 2D
slices (based on overlay
) or an interactive widget
(based on papayar::papaya
). Note: papayar
has been removed
from CRAN so the widget is not available. If papayar
returns to CRAN
the widget will be made available again.
view_xifti_volume(
xifti,
structural_img = "MNI",
color_mode = "auto",
zlim = NULL,
colors = NULL,
structural_img_colors = gray(0:255/280),
title = NULL,
idx = NULL,
plane = c("axial", "sagittal", "coronal"),
convention = c("neurological", "radiological"),
n_slices = 9,
slices = NULL,
together = NULL,
together_ncol = NULL,
together_title = NULL,
widget = FALSE,
fname = FALSE,
fname_suffix = c("names", "idx"),
fname_sub = FALSE,
legend_fname = "[fname]_legend",
legend_ncol = NULL,
legend_alllevels = FALSE,
legend_embed = NULL,
digits = NULL,
scientific = NA,
cex.title = NULL,
ypos.title = 0,
xpos.title = 0,
orientation_labels = TRUE,
crop = TRUE,
text_color = "white",
bg = NULL,
width = NULL,
height = NULL,
...
)
view_cifti_volume(
xifti,
structural_img = "MNI",
color_mode = "auto",
zlim = NULL,
colors = NULL,
structural_img_colors = gray(0:255/280),
title = NULL,
idx = NULL,
plane = c("axial", "sagittal", "coronal"),
convention = c("neurological", "radiological"),
n_slices = 9,
slices = NULL,
together = NULL,
together_ncol = NULL,
together_title = NULL,
widget = FALSE,
fname = FALSE,
fname_suffix = c("names", "idx"),
fname_sub = FALSE,
legend_fname = "[fname]_legend",
legend_ncol = NULL,
legend_alllevels = FALSE,
legend_embed = NULL,
digits = NULL,
scientific = NA,
cex.title = NULL,
ypos.title = 0,
xpos.title = 0,
orientation_labels = TRUE,
crop = TRUE,
text_color = "white",
bg = NULL,
width = NULL,
height = NULL,
...
)
viewCIfTI_volume(
xifti,
structural_img = "MNI",
color_mode = "auto",
zlim = NULL,
colors = NULL,
structural_img_colors = gray(0:255/280),
title = NULL,
idx = NULL,
plane = c("axial", "sagittal", "coronal"),
convention = c("neurological", "radiological"),
n_slices = 9,
slices = NULL,
together = NULL,
together_ncol = NULL,
together_title = NULL,
widget = FALSE,
fname = FALSE,
fname_suffix = c("names", "idx"),
fname_sub = FALSE,
legend_fname = "[fname]_legend",
legend_ncol = NULL,
legend_alllevels = FALSE,
legend_embed = NULL,
digits = NULL,
scientific = NA,
cex.title = NULL,
ypos.title = 0,
xpos.title = 0,
orientation_labels = TRUE,
crop = TRUE,
text_color = "white",
bg = NULL,
width = NULL,
height = NULL,
...
)
viewcii_volume(
xifti,
structural_img = "MNI",
color_mode = "auto",
zlim = NULL,
colors = NULL,
structural_img_colors = gray(0:255/280),
title = NULL,
idx = NULL,
plane = c("axial", "sagittal", "coronal"),
convention = c("neurological", "radiological"),
n_slices = 9,
slices = NULL,
together = NULL,
together_ncol = NULL,
together_title = NULL,
widget = FALSE,
fname = FALSE,
fname_suffix = c("names", "idx"),
fname_sub = FALSE,
legend_fname = "[fname]_legend",
legend_ncol = NULL,
legend_alllevels = FALSE,
legend_embed = NULL,
digits = NULL,
scientific = NA,
cex.title = NULL,
ypos.title = 0,
xpos.title = 0,
orientation_labels = TRUE,
crop = TRUE,
text_color = "white",
bg = NULL,
width = NULL,
height = NULL,
...
)
xifti |
A |
structural_img |
The structural MRI image on which to overlay the
subcortical plot. Can be a file name, |
color_mode |
(Optional) |
zlim |
(Optional) Controls the mapping of values to each
color in |
colors |
(Optional) |
structural_img_colors |
Colors to use for the background image. These
will be assigned in order from lowest to highest value with equal spacing
between the colors. ( |
title |
Optional title(s) for the plot(s). It will be printed at the top. Default: To use a custom title(s), use a length 1 character vector (same title for
each plot) or length If the title is non-empty but does not appear, try lowering |
idx |
The time/column index of the data to display. If If |
plane |
The plane to display for the slices:
|
convention |
|
n_slices |
The number of slices to display. Default: |
slices |
Which slices to display. If provided, this argument will
override |
together |
Only applies if saving image files (
|
together_ncol |
If |
together_title |
If a composite image is made based on |
widget |
Create an interactive widget using Note that the widget can only display one Note: |
fname , fname_suffix |
Save the plot(s) (and color legend if applicable)? If If If neither of the cases above apply, a png image will be written for each
|
fname_sub |
Add "_sub" to the end of the names of the files being saved?
Default: |
legend_fname |
Save the color legend? Since the legend is the same
for each |
legend_ncol |
Number of columns in color legend. If
|
legend_alllevels |
Show all label levels in the color legend? If
|
legend_embed |
Should the colorbar be embedded in the plot?
It will be positioned at the bottom. Default: Only applies if the color bar is used (sequential or diverging data). The color legend (qualitative data) cannot be embedded at the moment. |
digits |
The number of digits for the colorbar legend ticks.
If |
scientific |
Use scientific notation? If |
cex.title |
Font size multiplier for the title. |
ypos.title , xpos.title |
The positioning of the title can be finicky,
especially when using an R Markdown document interactively in which case it
appears too high in the plot. Use these arguments to nudge the title up
or down ( |
orientation_labels |
Show orientation labels at the top left and top
right of the plot? These will indicate the directions along the left-right
axis for each slice image. Default: |
crop |
Crop the slice subplots to the subcortical structures, instead of
showing the full anatomical image? Default: |
text_color |
Color for text in title and colorbar legend. Default:
|
bg |
Background color. |
width , height |
The dimensions of the plot, in pixels. Only affects saved
images (if Currently, there is no way to control the dimensions of the plot if working interactively in RStudio or creating a knitted R Markdown document. The default appears to be a wide aspect ratio. |
... |
Additional arguments to pass to |
Note that color_mode
, zlim
, and colors
only affect the
color scale of the data values whereas structural_img_colors
only
affects the color scale of the background image.
Currently, the color-related arguments only affect the 2D slice view. The color limits and palette must be edited using the widget controls once it's rendered.
Arguments concerning anatomical orientation assume that the subcortical data is stored in the following way: first dimension is normal to the sagittal plane, going left to right; second dimension is normal to the coronal plane, going from the front of the head (anterior) to the back (posterior); third dimension is normal to the axial plane, going from the top of the head (superior) to the neck (inferior).
For non-interactive plots, if n_slices > 1
and convention="neurological"
,
axial slices are ordered from the neck (inferior) to the top of the head
(superior), sagittal slices are ordered left to right, and coronal slices
are ordered back (posterior) to front (anterior). If
convention="radiological"
, sagittal slices are instead ordered right
to left.
If a png or pdf file(s) were written, the names of the files for
each index (and color legend if applicable) will be returned. Otherwise,
NULL
is invisibly returned.
Other visualizing:
view_comp()
,
view_surf()
,
view_xifti()
,
view_xifti_surface()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.