fmri_3dvisual {TCIU} | R Documentation |
visualization of the 3D brain with the activated areas
Description
a visualization method, using plotly
to draw the 3D plot of the brain
with the activated areas determined by p-values, which is generated from fMRI data
Usage
fmri_3dvisual(
pval,
mask,
p_threshold = 0.05,
method = "scale_p",
color_pal = "YlOrRd",
multi_pranges = TRUE,
title = NULL
)
Arguments
pval |
a 3D array of p-values used to plot activated area of the brain |
mask |
a 3D nifti or 3D array of data to show the shell of the brain |
p_threshold |
NULL or a numeric value that can be selected randomly below 0.05 to drop all p-values above the threshold. If 'low5_percent' method is used, make 'p_threshold' as NULL. The default is 0.05. |
method |
a string that represents method for the plot. There are 2 options: 'scale_p' and 'low5_percent'. The default is 'scale_p'. 'scale_p' is to draw the plot with fixed color scale for fixed range of p value. 'low5_percent' is to draw the plot for the smallest 5 percent of p value when all the p values are not significant. |
color_pal |
the name of the color palettes provided by |
multi_pranges |
an option under 'scale_p' method to decide whether there are at most 9 colors in the legend for the ranges of p value, or at most 4 colors. The default is TRUE, choosing the larger number of colors for the plot. |
title |
the title of the plot. The default is NULL. |
Details
The function fmri_3dvisual
is used to visualize the 3D plot of the brain
with its activated parts based on provided p values. The p values are generated by
applying statistical test on fMRI data. When providing input of a 3D p-values data,
a 3D interactive plot will be generated with surface for the brain shell
and scatter points in different colors and size representing different stimulated levels.
Value
a list of two elements
plot - the 3d plot of the fMRI data drawn by
plotly
pval_df - data.frame with the p value for each voxel and the specified color for it
Author(s)
SOCR team <http://socr.umich.edu/people/>
Examples
# sample 3D data of mask provided by the package
dim(mask)
# sample 3D p value provided by the package
dim(phase2_pval)
# make the 3D plot
fmri_3dvisual(phase2_pval, mask, p_threshold = 0.05, method="scale_p")$plot