fitTransformToPairedPoints.Rd
Estimate a transform using paired point sets. An ANTsR transform is returned.
fitTransformToPairedPoints(
movingPoints,
fixedPoints,
transformType = "affine",
regularization = 1e-06,
domainImage = NULL,
numberOfFittingLevels = 4,
meshSize = 1,
splineOrder = 3,
enforceStationaryBoundary = TRUE,
displacementWeights = NULL,
numberOfCompositions = 10,
compositionStepSize = 0.5,
sigma = 0,
convergenceThreshold = 1e-06,
numberOfTimeSteps = 2,
numberOfIntegrationSteps = 100,
rasterizePoints = FALSE,
verbose = FALSE
)
Moving points specified in physical space as a n x d
matrix where n
is the number of points and d
is the dimensionality.
Fixed points specified in physical space as a n x d
matrix where n
is the number of points and d
is the dimensionality.
'rigid', 'similarity', 'affine', 'bspline', 'tps', 'diffeo', 'syn', 'tv', or 'time-varying'.
Ridge penalty in [0,1] for linear transforms.
Defines physical domain of the B-spline transform. Must be defined for nonlinear transforms.
Integer specifying the number of fitting levels for the B-spline interpolation of the displacement field.
Defines the mesh size at the initial fitting level for the B-spline interpolation of the displacement field.
Spline order of the B-spline displacement field.
Ensure no displacements on the image boundary (B-spline only).
Defines the individual weighting of the corresponding scattered data value. Default = None meaning all displacements are weighted the same.
Total number of compositions for the diffeomorphic transform.
Scalar multiplication factor of the weighting of the update field for the diffeomorphic transforms.
Gaussian smoothing standard deviation of the update field (in mm).
Composition-based convergence parameter for the diffeomorphic transforms using a window size of 10 values.
Time-varying velocity field parameter.
Number of steps used for integrating the velocity field.
Use nearest neighbor rasterization of points for estimating update field (potential speed-up).
Print progress to the screen.
object containing ANTsR transform, error, and scale (or displacement field)
fixed <- matrix(c(50, 50, 200, 50, 50, 200), ncol = 2, byrow = TRUE)
moving <- matrix(c(50, 50, 50, 200, 200, 200), ncol = 2, byrow = TRUE)
# Affine transform
xfrm <- fitTransformToPairedPoints(moving, fixed, transformType = "Affine",
regularization = 0)
params <- getAntsrTransformParameters(xfrm)
# Rigid transform
xfrm <- fitTransformToPairedPoints(moving, fixed, transformType = "Rigid",
regularization = 0)
params <- getAntsrTransformParameters(xfrm)
# Similarity transform
xfrm <- fitTransformToPairedPoints(moving, fixed,
transformType = "Similarity", regularization = 0)
params <- getAntsrTransformParameters(xfrm)
# B-spline transform
domainImage <- antsImageRead(getANTsRData("r16"))
xfrm <- fitTransformToPairedPoints(moving, fixed,
transformType = "Bspline", domainImage = domainImage,
numberOfFittingLevels = 5)