composeTransformsToField: Compose arbitrary transform list into a deformation field.

View source: R/composeTransformsToField.R

composeTransformsToFieldR Documentation

Compose arbitrary transform list into a deformation field.

Description

A deformation field can capture any domain to domain correspondence that we can represent in ANTsR. This function will map a list of transforms into a single deformation field object.

Usage

composeTransformsToField(image, transforms)

Arguments

image

input image defines the transformation domain

transforms

list of transform filenames or antrTransforms

Value

field deformation object is output

Author(s)

Avants BB, Duda JT

Examples


fi <- antsImageRead(getANTsRData("r16"))
mi <- antsImageRead(getANTsRData("r64"))
fi <- resampleImage(fi, c(60, 60), 1, 0)
mi <- resampleImage(mi, c(60, 60), 1, 0) # speed up
mytx <- antsRegistration(fixed = fi, moving = mi, typeofTransform = c("SyN"))
compfield <- composeTransformsToField(fi, mytx$fwd)
atx <- antsrTransformFromDisplacementField(compfield)
wrped <- applyAntsrTransformToImage(atx, mi, fi)


stnava/ANTsR documentation built on April 16, 2024, 12:17 a.m.