ROIVec | R Documentation |
ROIVec
This function constructs an instance of the ROIVec class, which represents a region of interest (ROI) in a 4D volume. The class stores the NeuroSpace object, voxel coordinates, and data values for the ROI.
ROIVec(vspace, coords, data = rep(nrow(coords), 1))
vspace |
An instance of class |
coords |
A 3-column matrix of voxel coordinates for the region of interest. |
data |
The matrix of data values associated with the region of interest, with each row representing a voxel and each column representing a time point. By default, it is a matrix with a number of rows equal to the number of rows in the 'coords' matrix and a single column filled with ones. |
An instance of class ROIVec
, 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, 10), 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 data matrix for the ROI
data <- matrix(rnorm(30), nrow = 10, ncol = 3)
# Create a ROIVec object
roi_vec <- ROIVec(vspace, coords, data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.