Description Usage Arguments Value Author(s) Examples
View source: R/fitBsplineDisplacementField.R
Fit a b-spline object to a dense displacement field image and/or a set of points
with associated displacements and smooths them using B-splines. The inverse
can also be estimated.. This is basically a wrapper
for the ITK filter https://itk.org/Doxygen/html/classitk_1_1DisplacementFieldToBSplineImageFilter.html
which, in turn is a wrapper for the ITK filter used for the function
ANTsR::fitBsplineObjectToScatteredData
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | fitBsplineDisplacementField(
displacementField = NULL,
displacementWeightImage = NULL,
displacementOrigins = NULL,
displacements = NULL,
displacementWeights = NULL,
origin = NULL,
spacing = NULL,
size = NULL,
direction = NULL,
numberOfFittingLevels = 4,
meshSize = 1,
splineOrder = 3,
enforceStationaryBoundary = TRUE,
estimateInverse = FALSE
)
|
displacementField |
input displacement field. Either this and/or the points must be specified. |
displacementWeightImage |
input image defining weighting of the voxelwise displacements
in the |
displacementOrigins |
matrix ( |
displacements |
matrix ( |
displacementWeights |
vector defining the individual weighting of the corresponding scattered data value. Default = NULL meaning all values are weighted the same. |
origin |
vector defining the physical origin of the B-spline
displacement field. Must be specified if |
spacing |
vector defining the physical spacing of the B-spline
object. Defines the sampling rate in the parametric domain. Must be specified if
|
size |
vector defining the size (length) of the
B-spline object. Note that the length of the B-spline object in dimension |
direction |
matrix defining the orientation of the sampled
B-spline object. Must be specified if |
numberOfFittingLevels |
integer specifying the number of fitting levels. |
meshSize |
vector defining the mesh size at the initial fitting level. |
splineOrder |
spline order of the B-spline object. Default = 3. |
enforceStationaryBoundary |
ensure no displacements on the image boundary. Default = TRUE. |
estimateInverse |
estimate the inverse displacement field. Default = FALSE. |
ANTsR image.
NJ Tustison
1 2 3 4 5 6 7 8 9 10 | # Perform 2-D fitting
points <- matrix( data = c( -50, -50 ), nrow = 1, byrow = TRUE )
deltas <- matrix( data = c( 10, 10 ), nrow = 1, byrow = TRUE )
bsplineField <- fitBsplineDisplacementField(
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 ),
numberOfFittingLevels = 4, meshSize = c( 1, 1 ) )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.