read.nifti: Read data (header/image) from nifti/analyze file...

View source: R/nifti.R

read.niftiR Documentation

Read data (header/image) from nifti/analyze file...

Description

Read data (header/image) from nifti/analyze file

Usage

read.nifti(fname)

Arguments

fname

nifti/analyze filename

Details

If you have a both a .hdr and .img, you can input the filename of either

Value

nifti object

Note

Some of the C code that this function calls was borrowed from Rniftilib

Author(s)

Zarrar Shehzad

See Also

read.nifti.header, write.nifti object

Examples

fname <- file.path(system.file("data", package="niftir"), "test.nii.gz") # 2x2x2 size file
# or fname <- file.choose()
nim <- read.nifti(fname)
nim[1,1,2]  # returns voxel value at x=1, y=1, z=2
header(nim)  # returns header attributes as a list

czarrar/niftir documentation built on April 19, 2022, 3:35 a.m.