basisWarp: Generate a deformable map from basis

View source: R/randomImageTransformAugmentation.R

basisWarpR Documentation

Generate a deformable map from basis

Description

The function will generate a deformable transformation (via exponential map) from a basis of deformations.

Usage

basisWarp(
  deformationBasis,
  betaParameters,
  numberOfCompositions = 2,
  spatialSmoothing = 0
)

Arguments

deformationBasis

list containing deformationBasis set

betaParameters

vector containing deformationBasis set parameters

numberOfCompositions

integer greater than or equal to one

spatialSmoothing

spatial smoothing for generated deformation

Value

list of fields

Author(s)

Avants BB

See Also

randomImageTransformParametersBatchGenerator

Examples

## Not run: 
library( ANTsR )
i1 = ri( 1 ) %>% resampleImage( 4 )
i2 = ri( 2 ) %>% resampleImage( 4 )
reg = antsRegistration( i1, i2, 'SyN' )
w =  composeTransformsToField( i1, reg$fwd )
bw = basisWarp( list( w, w ), c( 0.25, 0.25 ), 2, 0 )
bwApp = applyAntsrTransformToImage( bw, i2, i1 )
bw = basisWarp( list( w, w ), c( 0.25, 0.25 )*(-1.0), 2, 0 ) # inverse
bwApp = applyAntsrTransformToImage( bw, i1, i2 )

## End(Not run)

ANTsX/ANTsRNet documentation built on April 23, 2024, 1:24 p.m.