Mesh2Image: Create a (optionally) binary image from surface mesh

Description Usage Arguments Value

View source: R/signedDist.r

Description

Create a (optionally) binary image from surface mesh

Usage

1
2
3
4
Mesh2Image(x, spacing = rep(1, 3), margin = 0.05, sign = FALSE,
  k = 1, IJK2RAS = diag(c(-1, -1, 1, 1)), inval = 255, outval = 0,
  thresh = min(spacing), binary = FALSE, cores = 2, useMP = TRUE,
  maxind = ifelse(useMP, 1e+06, 1e+05))

Arguments

x

surface mesh

spacing

spacing of grid

margin

percentage to add to grid

sign

logical: if TRUE signed distances are computed

k

k- closest faces to consider during closest point search

IJK2RAS

transformation between physical and image space

inval

inside value

outval

outside value (only considered if binary = TRUE) otherwise outval = thresh.

thresh

maximal distance to consider

binary

logical: if TRUE the output will be a binary image

cores

integer: amount of cores used in parallel execution (be careful, as the process gets forked and then uses cores times as much RAM).

useMP

logical: if TRUE the parallel computation will be during kdtree search, otherwise the mclapply is used.

maxind

integer: maximum amount of grid points to evaluate at once (for memory reasons)

Value

returns a distance image of class antsImage


zarquon42b/RANTs documentation built on Aug. 2, 2019, 6:46 p.m.