Vector field functions#

Initialization#

affine_flow(→ torch.Tensor)

Compute dense flow field from homogeneous transformation.

compose_flows(→ torch.Tensor)

Compute composite flow field w = v o u = u(x) + v(x + u(x)).

zeros_flow(→ torch.Tensor)

Create batch of flow fields filled with zeros for given image batch size or grid.

Normalization#

normalize_flow(→ torch.Tensor)

Map vectors with respect to unnormalized grid to vectors with respect to normalized grid.

denormalize_flow(→ torch.Tensor)

Map vectors with respect to normalized grid to vectors with respect to unnormalized grid.

Sampling#

sample_flow(→ torch.Tensor)

Sample non-rigid flow fields at given points.

Warping#

warp_grid(→ torch.Tensor)

Transform undeformed grid by a tensor of non-rigid flow fields.

warp_points(→ torch.Tensor)

Transform set of points by a tensor of non-rigid flow fields.

warp_image(→ torch.Tensor)

Sample data at optionally displaced grid points.

Miscellaneous#

curl(→ torch.Tensor)

Calculate curl of vector field.

expv(→ torch.Tensor)

Group exponential maps of flow fields computed using scaling and squaring.

jacobian_det(→ torch.Tensor)

Evaluate Jacobian determinant of spatial deformation.