fitThinPlateSplineDisplacementField.Rd
Fit a thin-plate spline object to a set of source points with associated displacements. This is basically a wrapper for the ITK class https://itk.org/Doxygen/html/itkThinPlateSplineKernelTransform_8h.html. Returns a displacement field.
fitThinPlateSplineDisplacementField(
displacementOrigins = NULL,
displacements = NULL,
origin = NULL,
spacing = NULL,
size = NULL,
direction = NULL
)
matrix (numberOfPoints x dimension
) defining the
origins of the input displacement points. Default = NULL.
matrix (numberOfPoints x dimension
) defining the
displacements of the input displacement points. Default = NULL.
vector defining the physical origin of the B-spline
displacement field. Must be specified if displacementField
is not specified.
Otherwise, the displacementField
is used to define the domain parameters.
vector defining the physical spacing of the B-spline
object. Defines the sampling rate in the parametric domain. Must be specified if
displacementField
is not specified. Otherwise, the
displacementField
is used to define the domain parameters.
vector defining the size (length) of the
B-spline object. Note that the length of the B-spline object in dimension d
is defined as parametricDomainSpacing[d] * (parametricDomainSize[d]-1)
.
Must be specified if displacementField
is not specified. Otherwise, the
displacementField
is used to define the domain parameters.
matrix defining the orientation of the sampled
B-spline object. Must be specified if displacementField
is not specified.
Otherwise, the displacementField
is used to define the domain parameters.
ANTsR image.
# Perform 2-D fitting
points <- matrix(data = c(-50, -50), nrow = 1, byrow = TRUE)
deltas <- matrix(data = c(10, 10), nrow = 1, byrow = TRUE)
tpsField <- fitThinPlateSplineDisplacementField(
displacementOrigins = points, displacements = deltas,
origin = c(0.0, 0.0), spacing = c(1.0, 1.0), size = c(100, 100),
direction = matrix(data = c(-1, 0, 0, -1), nrow = 2, byrow = TRUE)
)