surfwidget | R Documentation |
This generic function creates a widget for visualizing surface data, allowing for different implementations based on the type of surface object.
Create a surfwidget to display brain surface data.
surfwidget(x, width = NULL, height = NULL, ...)
## S4 method for signature 'SurfaceGeometry'
surfwidget(
x,
width = NULL,
height = NULL,
data = NULL,
cmap = grDevices::rainbow(256),
irange = NULL,
thresh = c(0, 0),
vertexColors = NULL,
alpha = 1,
config = list(),
...
)
## S4 method for signature 'NeuroSurface'
surfwidget(
x,
width = NULL,
height = NULL,
cmap = grDevices::rainbow(256),
irange = range(x@data),
thresh = c(0, 0),
vertexColors = NULL,
alpha = 1,
config = list(),
...
)
## S4 method for signature 'ColorMappedNeuroSurface'
surfwidget(
x,
width = NULL,
height = NULL,
thresh = c(0, 0),
vertexColors = NULL,
alpha = 1,
config = list(),
...
)
## S4 method for signature 'VertexColoredNeuroSurface'
surfwidget(x, width = NULL, height = NULL, alpha = 1, config = list(), ...)
x |
A SurfaceGeometry, NeuroSurface, ColorMappedNeuroSurface, or VertexColoredNeuroSurface object |
width |
The width of the widget |
height |
The height of the widget |
... |
Additional arguments for customizing the widget appearance and behavior. |
data |
Optional. Numeric vector of data values for each vertex. |
cmap |
Optional. Color map for data visualization. |
irange |
Optional. Intensity range for data visualization. |
thresh |
Optional. Threshold range for data visualization. |
vertexColors |
Optional. Vector of colors for each vertex. |
alpha |
Opacity of the surface (0 to 1). |
config |
A list of configuration options for the surface rendering:
|
The surfwidget function creates an interactive widget for visualizing surface data, such as brain surfaces. The specific implementation depends on the class of the object provided, allowing for customized behavior for different types of surface representations.
An HTMLWidget object representing the surface visualization.
An HTMLWidget object
plot_js
, SurfaceGeometry
, NeuroSurface
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.