vreg.Volume3D.find_transform_to#

Volume3D.find_transform_to(target, transform, params=None, metric=None, optimizer=None, resolutions=None, mask=None, target_mask=None, **kwargs)[source]#

Coregister a volume to a static target volume.

Parameters:
  • target (vreg.Volume3D) – Fixed target volume for the coregistration.

  • 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 goodness of alignment. Options are ‘mi’ (mutual information), ‘sos’ (sum of squares), and ‘migrad’ (mutual information of the image gradient). Default is ‘mi’.

  • optimizer (dict, optional) – Optimizer as a dictionary with one key method specifying the method used for optimization. The other items in the dictionary are any optional keywords accepted by the method. Defaults to {‘method’:’LS’}.

  • resolutions (list, optional) – Resolutions to use in the optimization. Defaults to [1].

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

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

  • kwargs (dict, optional) – optional keyword arguments for the transform function.

Returns:

The optimal values for the transformaton parameters.

Return type:

params