View source: R/view_xifti_surface.R
view_xifti_surface | R Documentation |
"xifti"
Visualize "xifti"
cortical data using an interactive Open GL window
or htmlwidget made with rgl
. The rmarkdown
package is
required for the htmlwidget functionality.
view_xifti_surface(
xifti = NULL,
surfL = NULL,
surfR = NULL,
color_mode = "auto",
zlim = NULL,
colors = NULL,
idx = NULL,
hemisphere = NULL,
together = NULL,
together_ncol = NULL,
together_title = NULL,
view = c("both", "lateral", "medial"),
widget = NULL,
title = NULL,
slider_title = "Index",
fname = FALSE,
fname_suffix = c("names", "idx"),
legend_fname = "[fname]_legend",
legend_ncol = NULL,
legend_alllevels = FALSE,
legend_embed = NULL,
digits = NULL,
scientific = NA,
cex.title = NULL,
text_color = "black",
bg = NULL,
NA_color = "white",
borders = FALSE,
alpha = 1,
edge_color = NULL,
vertex_color = NULL,
vertex_size = 0,
material = NULL,
shadows = 1,
width = NULL,
height = NULL,
zoom = NULL
)
view_cifti_surface(
xifti = NULL,
surfL = NULL,
surfR = NULL,
color_mode = "auto",
zlim = NULL,
colors = NULL,
idx = NULL,
hemisphere = NULL,
together = NULL,
together_ncol = NULL,
together_title = NULL,
view = c("both", "lateral", "medial"),
widget = NULL,
title = NULL,
slider_title = "Index",
fname = FALSE,
fname_suffix = c("names", "idx"),
legend_fname = "[fname]_legend",
legend_ncol = NULL,
legend_alllevels = FALSE,
legend_embed = NULL,
digits = NULL,
scientific = NA,
cex.title = NULL,
text_color = "black",
bg = NULL,
NA_color = "white",
borders = FALSE,
alpha = 1,
edge_color = NULL,
vertex_color = NULL,
vertex_size = 0,
material = NULL,
shadows = 1,
width = NULL,
height = NULL,
zoom = NULL
)
viewCIfTI_surface(
xifti = NULL,
surfL = NULL,
surfR = NULL,
color_mode = "auto",
zlim = NULL,
colors = NULL,
idx = NULL,
hemisphere = NULL,
together = NULL,
together_ncol = NULL,
together_title = NULL,
view = c("both", "lateral", "medial"),
widget = NULL,
title = NULL,
slider_title = "Index",
fname = FALSE,
fname_suffix = c("names", "idx"),
legend_fname = "[fname]_legend",
legend_ncol = NULL,
legend_alllevels = FALSE,
legend_embed = NULL,
digits = NULL,
scientific = NA,
cex.title = NULL,
text_color = "black",
bg = NULL,
NA_color = "white",
borders = FALSE,
alpha = 1,
edge_color = NULL,
vertex_color = NULL,
vertex_size = 0,
material = NULL,
shadows = 1,
width = NULL,
height = NULL,
zoom = NULL
)
viewcii_surface(
xifti = NULL,
surfL = NULL,
surfR = NULL,
color_mode = "auto",
zlim = NULL,
colors = NULL,
idx = NULL,
hemisphere = NULL,
together = NULL,
together_ncol = NULL,
together_title = NULL,
view = c("both", "lateral", "medial"),
widget = NULL,
title = NULL,
slider_title = "Index",
fname = FALSE,
fname_suffix = c("names", "idx"),
legend_fname = "[fname]_legend",
legend_ncol = NULL,
legend_alllevels = FALSE,
legend_embed = NULL,
digits = NULL,
scientific = NA,
cex.title = NULL,
text_color = "black",
bg = NULL,
NA_color = "white",
borders = FALSE,
alpha = 1,
edge_color = NULL,
vertex_color = NULL,
vertex_size = 0,
material = NULL,
shadows = 1,
width = NULL,
height = NULL,
zoom = NULL
)
xifti |
A |
surfL , surfR |
(Optional) The brain surface model to use. Each can be a
|
color_mode |
(Optional) |
zlim |
(Optional) Controls the mapping of values to each
color in |
colors |
(Optional) |
idx |
The time/column index of the data to display. If its length is greater than one, and |
hemisphere |
Which brain cortex to display: "both" (default), "left", or "right". Each will be plotted in a separate panel column. If a brain cortex is requested but no surface is available, a default inflated surface will be used. This argument can also be Surfaces without data will be colored white. |
together |
Only applies if saving image files (
|
together_ncol |
If |
together_title |
If a composite image is made based on |
view |
Which view to display: |
widget |
Display the plot in an htmlwidget? Should be logical or
|
title |
Optional title(s) for the plot(s). It will be printed at the top in a separate subplot with 1/4 the height of the brain cortex subplots. 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 |
slider_title |
Text at bottom of plot that will be added if a slider
is used, to provide a title for it. Default: |
fname |
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_suffix |
Either the data column names ( |
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 in the bottom-left corner, in a separate subplot
with 1/4 the height of the brain cortex subplots. Default: Only applies if the color bar is used (sequential or diverging data)
or if |
digits |
The number of digits for the colorbar legend ticks.
If |
scientific |
Use scientific notation? If |
cex.title |
Font size multiplier for the title. |
text_color |
Color for text in title and colorbar legend. Default:
|
bg |
Background color. |
NA_color |
The color for the medial wall and |
borders |
Only applicable if |
alpha |
Transparency value for mesh coloring, between 0 and 1. Default:
|
edge_color |
Outline each edge in this color. Default: |
vertex_color |
Draw each vertex in this color. Default:
|
vertex_size |
Draw each vertex with this size. Default: |
material |
A list of materials from |
shadows |
Number from 0 (maximum added lighting) to 1 (no added
lighting) to control the darkness and extent of shadowing on the 3D surface.
Default: |
width , height |
The dimensions of the RGL window, in pixels. If both are
The plot will be taller than If multiple |
zoom |
Adjust the sizes of the brain meshes. Default: |
If a png or html file(s) were written, the names of the files for each index (and color legend if applicable) will be returned. Otherwise, the widget itself is returned if a widget was used, and the rgl object IDs are returned if an Open GL window was used. The rgl object IDs are useful for further programmatic manipulation of the Open GL window.
To navigate the interactive Open GL window and html widget, left click and
drag the cursor to rotate the meshes. Use the scroll wheel or right click
and drag to zoom. Press the scroll wheel and drag to change the field-of-view.
For Open GL windows, execute
snapshot
to save the current window as a .png file,
close3d
to close the window, and
view3d
to programmatically control the
perspective.
To embed an interactive plot in an R Markdown document, first execute
rgl::setupKnitr()
to prepare the document for embedding the widget.
Then execute the plot command as you normally would to create a widget (i.e.
without specifying fname
, and by requesting more than one idx
or by setting widget
to TRUE
). When the R Markdown document is
knitted, the interactive widget should be displayed below the chunk in which
the plot command was executed. See the vignette for an example.
To embed a static plot in an R Markdown document, first execute
rgl::setupKnitr()
to prepare the document for embedding the snapshot
of the Open GL window. Then execute the plot command as you normally would
to create an Open GL window (i.e. without specifying fname
, and by
requesting only one idx
). In the options for the chunk in which the
plot command is executed, set rgl=TRUE, format="png"
. You can also
control the image dimensions here e.g. fig.height=3.8, fig.width=5
.
When the R Markdown document is knitted, the static plots should be
displayed below the chunk in which the plot command was executed. See the
vignette for an example.
Other visualizing:
view_comp()
,
view_surf()
,
view_xifti()
,
view_xifti_volume()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.