Learn R Programming

neuroim2 (version 0.8.5)

read_vol: Load an image volume from a file

Description

Load an image volume from a file

Usage

read_vol(file_name, index = 1)

Value

an instance of the class DenseNeuroVol

Arguments

file_name

the name of the file to load

index

the index of the volume (e.g. if the file is 4-dimensional)

Examples

Run this code
fname <- system.file("extdata", "global_mask_v4.nii", package="neuroim2")
x <- read_vol(fname)
print(dim(x))
space(x)

Run the code above in your browser using DataLab