Apply a fitted Deformetrica diffeomorphism to 3D points (geodesic shooting)
Source:R/deformetrica4.R
deformetrica_shoot.RdFlows arbitrary points through the diffeomorphism defined by a fitted
registration's control points and initial momenta, by writing a
<model-type>Shooting model and calling deformetrica compute.
Arguments
- x
An N x 3 matrix of coordinates, or anything
nat::xyzmatrix()accepts.- control_points, momenta
Path to the estimated Deformetrica
...ControlPoints.txt/...Momenta.txt, or a numeric matrix. Passing the files Deformetrica itself wrote is strongly preferred: it writes momenta with a leadingn_subjects n_cp dimheader that its own reader expects, so a bare matrix is best-effort only. Alternatively pass adeformetricaregobject (fromdeformetrica_register()) ascontrol_pointsand leavemomenta/kernel_widthunset — they are taken from the registration.- kernel_width
Deformation kernel width, in the coordinate units. Larger = stiffer / more global; must match the width the registration was fit with.
- timepoints
Number of geodesic integration steps; must match the fit.
- object_type
Deformetrica
deformable-object-type(default "Landmark").- device
kernel-device: "auto", "cpu" or "cuda".- deformetrica
Optional path to the executable (auto-detected otherwise).
- workdir
Working directory for the run (a fresh tempdir by default).
- flow
If
TRUE, return the whole geodesic flow (every timepoint) as a list of deformed objects (one per timepoint, namedtp_00..tp_NN) rather than just the final shape. Useful for animating a warp.- verbose
Show
deformetricaoutput.