ROIVol | R Documentation |
ROIVol
This function constructs an instance of the ROIVol class, which represents a region of interest (ROI) in a 3D volume. The class stores the NeuroSpace object, voxel coordinates, and data values for the ROI.
ROIVol(vspace, coords, data = rep(1, nrow(coords)))
vspace |
An instance of class |
coords |
A 3-column matrix of voxel coordinates for the region of interest. |
data |
The data values associated with the region of interest, provided as a numeric vector. By default, it is a vector of ones with a length equal to the number of rows in the 'coords' matrix. |
An instance of class ROIVol
, containing the NeuroSpace object,
voxel coordinates, and data values for the region of interest.
# Create a NeuroSpace object
vspace <- NeuroSpace(dim = c(5, 5, 5), spacing = c(1, 1, 1))
# Define voxel coordinates for the ROI
coords <- matrix(c(1, 2, 3, 2, 2, 2, 3, 3, 3), ncol = 3)
# Create a ROIVol object
roi_vol <- ROIVol(vspace, coords)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.