This function, by default, regularizes the total deformation field to produce a a constrained diffeomorphic mapping. Full custom parameters are possible by passing the same parameters that one would pass to antsRegistration.

xrayMotionCorrect(fixed, moving, totalSigma, flowSigma,
  regIterations = c(50, 50, 10), ...)

Arguments

fixed

fixed target image

moving

image to map to the fixed space

totalSigma

regularization for total deformation field

flowSigma

regularization for update deformation field

regIterations

deformable registration iterations / multi-resolution parameters

...

parameters to pass to antsRegistration

Value

deformed image

Examples

library( magrittr ) i1 = ANTsRCore::ri( 1 ) %>% ANTsRCore::resampleImage( 4 ) i2 = ANTsRCore::ri( 2 ) %>% ANTsRCore::resampleImage( 4 ) reg = xrayMotionCorrect( i1, i2 )