img2ps {LOMAR} | R Documentation |
img2ps
Description
Read an image into a point set. The points are formed by extracting the coordinates of voxel values strictly above the given cut-off (default 0).
Usage
img2ps(img = NULL, bkg = 0, crop.size = NULL)
Arguments
img |
either a 2d or 3d array or a path to a file containing a 2d or 3d image. |
bkg |
Extract points for values strictly above this (default = 0). |
crop.size |
vector (of length 2 or 3) containing the desired reduced size of the images along each dimension, e.g. c(30,30,30). |
Value
a point set as matrix with columns x,y[,z]
Examples
img.file <- system.file("test_data/img", "alien1_3d.tif", package = "LOMAR",
mustWork = TRUE)
point_set <- img2ps(img = img.file, bkg = 0)
[Package LOMAR version 0.4.0 Index]