ind2coord {nat} | R Documentation |
Find XYZ coords corresponding to 1D indices into a 3D image
Description
If you have an image-like object and you want to turn it into a
matrix of 3D coords then you need ind2coord
. For the reverse
operation we offer as.im3d.matrix
which allows you to turn a
matrix of 3D coordinates into an im3d
image object.
Usage
ind2coord(inds, ...)
## Default S3 method:
ind2coord(inds, dims, voxdims, origin, ...)
## S3 method for class 'array'
ind2coord(inds, voxdims = NULL, origin = NULL, ...)
## S3 method for class 'im3d'
ind2coord(inds, voxdims = NULL, origin = NULL, ...)
Arguments
inds |
indices into an image array (either 1D, for which |
... |
extra arguments passed to methods. |
dims |
dimensions of 3D image array. |
voxdims |
vector of 3 voxel dimensions (width, height, depth). |
origin |
the origin. |
See Also
coord2ind
, sub2ind
,
xyzpos
, as.im3d.matrix
[Package nat version 1.8.24 Index]