Description Usage Arguments Value Author(s) Examples
Extract a matrix from a time-series image after applying a mask.
1 | timeseriesimage2matrix( img , mask )
|
img |
Input image of type 'antsImage' or R array. |
mask |
Input mask of type 'antsImage' or R array. In either case, the number of voxels in the mask may be either equal to that of input image 'img' or equal to number of voxels in one time unit of input image 'img'. In the second case, the mask is reused for every time unit of the 'img'. |
Success – an R matrix of dimensions ( dim(img)[length(dim(img))] , sum(mask==1) )
Shrinidhi KL
1 2 3 4 5 6 7 8 | ## Not run:
img <- antsImageRead( "input.nii" , 4 )
mask <- array( 1 , dim(img)[1:3] )
# set some values of mask to FALSE ...
mat <- timeseriesimage2matrix( img , mask )
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.