compose_transform_to_file: Compose Transforms from ANTsR to a composite file

View source: R/compose_transform_to_file.R

compose_transform_to_fileR Documentation

Compose Transforms from ANTsR to a composite file

Description

This is a thin wrapper for antsApplyTransforms but is specifically for composing a transform and getting a file out.

Usage

compose_transform_to_file(
  fixed,
  moving,
  transformlist = NULL,
  output_prefix = NULL
)

Arguments

fixed

fixed image defining domain into which the moving image is transformed.

moving

moving image to be mapped to fixed space.

transformlist

haracter vector of transforms generated by antsRegistration where each transform is a filename.

output_prefix

Prefix of output filename to return. The prefix will add comptx.nii.gz to the end

Value

A character filename

Examples

library(ANTsR)
fixed <- antsImageRead( getANTsRData("r16") ,2)
moving <- antsImageRead( getANTsRData("r64") ,2)
fixed <- resampleImage(fixed,c(64,64),1,0)
moving <- resampleImage(moving,c(64,64),1,0)
mytx <- antsRegistration(fixed=fixed , moving=moving ,
                         typeofTransform = c("SyN"), 
                         verbose = TRUE
                          )
composed <- compose_transform_to_file( 
fixed=fixed, moving=moving, transformlist=mytx$fwdtransforms)

muschellij2/extrantsr documentation built on June 3, 2024, 7:04 p.m.