R/visualize.R
Matrix_to_VolumeTimeSeries.RdApplies a 2D/3D mask to a matrix to get a 3D/4D volume time series.
Matrix_to_VolumeTimeSeries(mat, mask, out_of_mask_value = NA, sliced_dim = NA)| mat | A matrix whose rows are observations at different times, and columns are pixels/voxels. |
|---|---|
| mask | A corresponding binary mask, with 1's representing regions within the area of interest and 0's representing regions to mask out. |
| out_of_mask_value | Fill value for out-of-mask voxels. Default: |
| sliced_dim | If the mask is 2D, which dimension does it represent? Will default to the 3rd dimension (axial). |
A 4D array representing the volume time series. Time is on the 4th dimension.