R/RcppExports.R

Defines functions streamxform

Documented in streamxform

# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

#' transform 3D points using one or more CMTK registrations
#'
#' @details To transform points from sample to reference space, you will need
#'   to use the inverse transformation. This can be achieved by preceding the
#'   registration with a \verb{--inverse} flag. When multiple registrations are
#'   being used the are ordered from sample to reference brain.
#' @param points an Nx3 matrix of 3D points
#' @param reglist A character vector specifying registrations. See details.
#' @param inversionTolerance the precision of the numerical inversion when
#'   transforming in the inverse direction.
#' @param affineonly Whether to apply only the affine portion of transforms
#'   default \code{FALSE}.
#' @export
#' @examples
#' \dontrun{
#' m=matrix(rnorm(30,mean = 50), ncol=3)
#' reg=system.file("extdata","cmtk","FCWB_JFRC2_01_warp_level-01.list", package='cmtkr')
#' # from reference to sample
#' streamxform(m, reg)
#'
#' # from sample to reference
#' streamxform(m, c("--inverse", reg))
#'
#' # concatenating 3 registrations to map S -> B1 -> B2 -> T
#' # the first two registrations are inverted, the last is not.
#' streamxform(m, c("--inverse", StoB1, "--inverse", B1toB2, TtoB2))
#' }
streamxform <- function(points, reglist, inversionTolerance = 1e-8, affineonly = FALSE) {
    .Call('_cmtkr_streamxform', PACKAGE = 'cmtkr', points, reglist, inversionTolerance, affineonly)
}
jefferis/cmtkr documentation built on Sept. 13, 2019, 1:56 a.m.