vreg.Volume3D.distance#

Volume3D.distance(target, transform, params, metric='mi', mask=None, target_ind=None, **kwargs)[source]#

Distance to a target volume after a transform

Parameters:
  • target (vreg.Volume3D) – Target volume

  • transform (str, optional) – Coordinate transformation. Possible values are ‘translate’, ‘rotate’, ‘stretch’, ‘transform_rigid’, ‘transform_affine’.

  • params (array-like, optional) – Initial parameters of the transformation. Defaults to None.

  • metric (func, optional) – Metric to quantify distance. Options are ‘mi’ (mutual information), ‘sos’ (sum of squares), and ‘migrad’ (mutual information of the image gradient). Default is ‘mi’.

  • mask (Volume3D, optional) – volume used for masking the moving volume. Defaults to None.

  • target_ind (numpy.ndarray, optional) – Indices in the target volume that count towards the distance. Defaults to None.

Returns:

distance after transform

Return type:

float