warp#

voxel.warp.compose_vector_fields(first, second) → VectorField#

Compose two displacement fields into the single field of applying first and then second, matching the order of a TransformSeries. The result lives on the grid of second, in pull-back form: a grid point is displaced by second and then by first sampled at the displaced position, \(d(x) = s(x) + f(x + s(x))\). Points beyond the extent of first see no displacement from it.

Parameters:
  • first (VectorField) – Displacement field applied first.

  • second (VectorField) – Displacement field applied second, defining the grid and the vector space of the result.

Returns:

VectorField – The composed displacement field.