volvis.lb | R Documentation |
This function is the main way to visualize 3D volume images that contain raw MRI scans or statistical results.
volvis.lb(
volume,
background = NULL,
colFn = viridis::viridis,
colortable = NULL,
no_act_source_value = 0,
bbox_threshold = NULL,
bbox_of_volume = TRUE,
...
)
volume |
numerical 3D array of per-voxel data, typically activation data, a raw MRI image, or a segmentation to show. Can also be a filename if the file can be loaded as such a volume with |
background |
numerical 3D array or 3D array of color strings, the background volume. Typically a raw brain volume. Dimensions and space must match those of the 'volume' for an array. Can also be a single file name as a character string. Can also be a single color name, like '#FEFEFE' but the string then must start with '#' (color names like 'red' are not allowed, they would be treated as file names). If a color string, be sure to use the |
colFn |
a colormap function, passed to |
colortable |
optional, only makes sense for categorical 'volume' data like segmentations. If not NULL, a colortable as returned by |
no_act_source_value |
numerical value, passed to |
bbox_threshold |
numerical scalar, passed on to |
bbox_of_volume |
logical, whether the bounding box is computed on the volume (foreground), which typically is what you want. Leave alone if in doubt. |
... |
extra parameters to be passed to |
This function should be preferred over manually calling volvis.lightbox
.
Other volume visualization:
volvis.lightbox()
## Not run:
volume = subject.volume(subjects_dir, subject_id, 'brain');
volvis.lb(volume);
volvis.lb("~/study1/subject1/mri/brain.mgz");
volvis.lb("~/study1/subject1/mri/brain.mgz", bbox_threshold = 1L);
volvis.lb("~/study1/subject1/mri/brain.mgz", background = "~/data/study1/subject1/mri/T1.mgz");
volvis.lb("~/study1/subject1/mri/brain.mgz", background = "#FEFEFE", background_color="#FEFEFE");
ct = file.path(find.freesurferhome(mustWork = T), "FreeSurferColorLUT.txt"); # ct = "color table"
volvis.lb("~/study1/subject1/mri/aseg.mgz", background="~/study1/subject1/mri/T1.mgz",
colortable = ct, colFn=NULL, axis=2L);
volvis.lb("~/study1/subject1/mri/aseg.mgz", background = "~/study1/subject1/mri/T1.mgz",
colortable = ct, colFn=NULL, bbox_threshold = 0);
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.