Load an image volume from a file
Arguments
- file_name
the name of the file to load
- index
the index of the volume (e.g. if the file is 4-dimensional)
Value
an instance of the class DenseNeuroVol
Examples
fname <- system.file("extdata", "global_mask.nii", package="neuroim2")
x <- read_vol(fname)
print(dim(x))
#> [1] 64 64 25
space(x)
#> NeuroSpace
#> Type : NeuroSpace
#> Dimension : 64 64 25
#> Spacing : 3.5 X 3.5 X 3.7
#> Origin : 112 X -108 X -46.2
#> Coordinate Transform : -3.5 0 0 0 0 3.5 0 0 0 0 3.7 0 112 -108 -46.2 1