Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

img_length

Gets Image Length in Each Dimension


Description

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

Usage

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

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

oro.nifti

Rigorous - 'NIfTI' + 'ANALYZE' + 'AFNI' : Input / Output

v0.11.0
BSD_3_clause + file LICENSE
Authors
Brandon Whitcher [aut, cre], Volker Schmid [aut], Andrew Thornton [aut], Karsten Tabelow [ctb], Jon Clayden [ctb], John Muschelli [aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.