mdreg.defo_norm#

mdreg.defo_norm(defo, norm='euclidian')[source]#

Calculate the norm of a deformation field.

Parameters:
  • defo (np.ndarray) – The deformation field to calculate the norm from. Dimensions are expected in the order [x, y, z, t, d], where x, y, z are the spatial dimensions, t is the time/dynamic, and d is the dimension of the deformation field (two for 2D registration, 3 for 3D registration)

  • norm (str) – The type of norm to use. Options are ‘euclidian’, ‘max’ or ‘eumip’ The latter is the maximum projection over time of the euclidian norm. Default is ‘euclidian’.

Returns:

norm – The norm of the deformation field with dimensions [x, y, z, t] or [x,y,z] (for option ‘eumip’)

Return type:

np.ndarray