img_length: Gets Image Length in Each Dimension

Description Usage Arguments Value Examples

View source: R/img_length.R

Description

Multiplies the number of slices by the voxel resolution for each direction.

Usage

1
img_length(img, units = c("mm", "cm"))

Arguments

img

Image object, any method with voxdim and dim_

units

output unit, either cubic mm or cubic cm.

Value

Scalar numeric, one number, in mm or cm.

Examples

1
2
3
nim <- nifti(array(rnorm(10^3), dim = c(5, 2, 100)),
pixdim = c(1, 0.5, 0.2, 1))
img_length(nim) 

neuroconductor-devel/oro.nifti documentation built on May 6, 2021, 1:49 p.m.