xyzpos converts pixel coordinates to physical coordinates
xyzpos
ijkpos converts physical coordinates to pixel coordinates
ijkpos
xyzpos(d, ijk)ijkpos(d, xyz, roundToNearestPixel = TRUE)
ijkpos(d, xyz, roundToNearestPixel = TRUE)
An im3d object defining a physical space
im3d
an Nx3 matrix of pixel coordinates (1-indexed)
Nx3 matrix of physical coordinates
Whether to round calculated pixel coordinates to nearest integer value (i.e. nearest pixel). default: TRUE
TRUE
Nx3 matrix of physica l or pixel coordinates
ind2coord
Other im3d: as.im3d, boundingbox, im3d-io, im3d, imexpand.grid, imslice, is.im3d, mask, origin, projection, threshold, unmask, voxdims
as.im3d
boundingbox
im3d-io
imexpand.grid
imslice
is.im3d
mask
origin
projection
threshold
unmask
voxdims
# NOT RUN { # make an emty im3d d=im3d(,dim=c(20,30,40),origin=c(10,20,30),voxdims=c(1,2,3)) # check round trip for origin stopifnot(all.equal(ijkpos(d,xyzpos(d,c(1,1,1))), c(1,1,1))) # }
Run the code above in your browser using DataLab