Defines functions read.path.amira

Documented in read.path.amira

#' read.path.amira
#' This function extracts and orders the coordinate matrix from a surface path file from Amira 
#' @param path.name character: path of surface path .ascii extension file
#' @return data numeric: a kxd matrix with xyz coordinates 
#' @author Antonio Profico, Costantino Buzi, Marina Melchionna, Paolo Piras, Pasquale Raia, Alessio Veneziano
#' @export
skip_1 <- which(readLines(path.name,  n = 9999999) == "@1")
skip_2 <- which(readLines((path.name), n = 9999999) == "@2")
vertices <- read.table((path.name), skip = skip_2)
numbering <- read.table((path.name), skip = skip_1, nrows = dim(vertices)[1]) 

Try the Arothron package in your browser

Any scripts or data that you put into this service are public.

Arothron documentation built on June 8, 2021, 5:08 p.m.