View source: R/landmarkTransforms.R
fitTransformToPairedPoints | R Documentation |
Estimate a transform using paired point sets. An ANTsR transform is returned.
fitTransformToPairedPoints(
movingPoints,
fixedPoints,
transformType = "affine",
regularization = 0.000001,
domainImage = NULL,
numberOfFittingLevels = 4,
meshSize = 1,
splineOrder = 3,
enforceStationaryBoundary = TRUE,
displacementWeights = NULL,
numberOfCompositions = 10,
compositionStepSize = 0.5,
sigma = 0,
convergenceThreshold = 0.000001,
numberOfTimeSteps = 2,
numberOfIntegrationSteps = 100,
rasterizePoints = FALSE,
verbose = FALSE
)
movingPoints |
Moving points specified in physical space as a |
fixedPoints |
Fixed points specified in physical space as a |
transformType |
'rigid', 'similarity', 'affine', 'bspline', 'tps', 'diffeo', 'syn', 'tv', or 'time-varying'. |
regularization |
Ridge penalty in [0,1] for linear transforms. |
domainImage |
Defines physical domain of the B-spline transform. Must be defined for nonlinear transforms. |
numberOfFittingLevels |
Integer specifying the number of fitting levels for the B-spline interpolation of the displacement field. |
meshSize |
Defines the mesh size at the initial fitting level for the B-spline interpolation of the displacement field. |
splineOrder |
Spline order of the B-spline displacement field. |
enforceStationaryBoundary |
Ensure no displacements on the image boundary (B-spline only). |
displacementWeights |
Defines the individual weighting of the corresponding scattered data value. Default = None meaning all displacements are weighted the same. |
numberOfCompositions |
Total number of compositions for the diffeomorphic transform. |
compositionStepSize |
Scalar multiplication factor of the weighting of the update field for the diffeomorphic transforms. |
sigma |
Gaussian smoothing standard deviation of the update field (in mm). |
convergenceThreshold |
Composition-based convergence parameter for the diffeomorphic transforms using a window size of 10 values. |
numberOfTimeSteps |
Time-varying velocity field parameter. |
numberOfIntegrationSteps |
Number of steps used for integrating the velocity field. |
rasterizePoints |
Use nearest neighbor rasterization of points for estimating update field (potential speed-up). |
verbose |
Print progress to the screen. |
object containing ANTsR transform, error, and scale (or displacement field)
B Avants, N Tustison
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.