Simulate a displacement field using random points with B-spline smoothing

simulateDisplacementField(
  domainImage,
  fieldType = c("bspline", "exponential"),
  numberOfRandomPoints = 1000,
  sdNoise = 10,
  enforceStationaryBoundary = TRUE,
  numberOfFittingLevels = 4,
  meshSize = 1,
  sdSmoothing = 4
)

Arguments

domainImage

image to define the domain of the field.

fieldType

either "bspline" or "exponential".

numberOfRandomPoints

number of displacement points. Default = 1000.

sdNoise

standard deviation of the displacement field noise (in mm). Default = 10.0.

enforceStationaryBoundary

boolean determining fixed boundary conditions. Default = TRUE.

numberOfFittingLevels

(bspline only) number of fitting levels. Default = 4.

meshSize

(bspline only) scalar or n-D vector determining fitting resolution. Default = 1.

sdSmoothing

(exponential only) standard deviation of the Gaussian smoothing in mm. Default = 4.0.

Value

ANTsR displacement field.

Examples

domainImage <- antsImageRead( getANTsRData( "r16" ), 2 ) expField <- simulateDisplacementField( domainImage, fieldType = "exponential" ) bsplineField <- simulateDisplacementField( domainImage, fieldType = "bspline" ) warp <- antsrTransformFromDisplacementField( bsplineField * 3 ) wimg <- applyAntsrTransformToImage( warp, domainImage, domainImage )