Description Usage Arguments Details Value Author(s) Examples
View source: R/read.nii.voxel.R
Read values from NIfTI files at given coordinates (x,y,z,t).
1 | read.nii.voxel(nii.file, coords)
|
nii.file |
Full directory listing to a NIfTI file. File must not be gzipped. |
coords |
A numeric vector conatining x,y,z,t coordinates indicating the location to read values |
NIfTI files need to be unzipped before using this function or any other portions of the nifti.io package. This is necessary given the inconsistent way in which gzipped files are indexed (Some information on this is given in the documentation for the readBin function).
Values for t coordinates (coords[4]) may be Inf to retrieve all timepoints for the given x,y,z coordinates. If data is 4D and only x, y, z coordinates are given, the value at those coordinates for the first volume only is returned.
A number or a numeric vector containing values for all timepoints.
Timothy R. Koscik <timothy-koscik@uiowa.edu>
1 2 3 4 5 6 7 8 9 10 | ## Not run:
example.image <- "~/example_image.nii"
coordinates <- c(50,50,50,1)
image.voxel <- read.nii.volume(nii.file = example.image, coords = coordinates)
example.image <- "~/example_image_multivolume.nii"
coordinates <- c(50,50,50,Inf)
image.voxel.allVolumes <- read.nii.volume(nii.file = example.image, coords = coordinates)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.