im3d: Construct an im3d object representing 3D image data,...

View source: R/im3d.R

im3dR Documentation

Construct an im3d object representing 3D image data, densities etc


im3d objects consist of a data array with attributes defining the spatial positions at which the voxels are located. There should always be a BoundingBox attribute which defines the physical extent of the volume in the same manner as the Amira 3D visualisation and analysis software. This corresponds to the node centers option in the NRRD format.


  x = numeric(0),
  dims = NULL,
  voxdims = NULL,
  origin = NULL,
  BoundingBox = NULL,
  bounds = NULL,



The object to turn into an im3d


The dimensions of the image array either as an integer vector or as an im3d object, whose attributes will provide defaults for dims, origin, BoundingBox, bounds arguments. The default (dims=NULL) will result in dims being set to x if x is an im3d object or dim(x) otherwise.


The voxel dimensions


the location (or centre) of the first voxel


Physical extent of the image. See the details section of boundingbox's help for the distinction between BoundingBox and bounds.


Physical extent of image


Additional attributes such as units or materials


We follow Amira's convention of setting the bounding box equal to voxel dimension (rather than 0) for any dimension with only 1 voxel.


An array with additional class im3d

See Also

Other im3d: as.im3d(), boundingbox(), im3d-coords, im3d-io, imexpand.grid(), imslice(), is.im3d(), mask(), origin(), projection(), threshold(), unmask(), voxdims()

nat documentation built on Aug. 25, 2023, 5:16 p.m.