compose_transform_to_file: Compose Transforms from ANTsR to a composite file

Description Usage Arguments Value Examples

View source: R/compose_transform_to_file.R

Description

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

Usage

1
2
3
4
5
6
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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 July 27, 2021, 7:41 a.m.