simulateDisplacementField.Rd
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
)
image to define the domain of the field.
either "bspline" or "exponential".
number of displacement points. Default = 1000.
standard deviation of the displacement field noise (in mm). Default = 10.0.
boolean determining fixed boundary conditions. Default = TRUE.
(bspline only) number of fitting levels. Default = 4.
(bspline only) scalar or n-D vector determining fitting resolution. Default = 1.
(exponential only) standard deviation of the Gaussian smoothing in mm. Default = 4.0.
ANTsR displacement field.
domainImage <- antsImageRead(getANTsRData("r16"), 2)
expField <- simulateDisplacementField(domainImage, fieldType = "exponential")
bsplineField <- simulateDisplacementField(domainImage, fieldType = "bspline")
warp <- antsrTransformFromDisplacementField(bsplineField * 3)
wimg <- applyAntsrTransformToImage(warp, domainImage, domainImage)