dbdicom.extensions.vreg.find_sbs_translation#

dbdicom.extensions.vreg.find_sbs_translation(moving: Series, static: Series, tolerance=0.1, metric='mutual information', region: Series | None = None, margin: float = 0, prereg=False) ndarray[source]#

Find the slice-by-slice translation that maps a moving volume onto a static volume.

Parameters:
  • moving (dbdicom.Series) – Series with the moving volume.

  • static (dbdicom.Series) – Series with the static volume

  • tolerance (float, optional) – Positive tolerance parameter to decide convergence of the gradient descent. A smaller value means a more accurate solution but also a lomger computation time. Defaults to 0.1.

  • metric (str, option) – Determines which metric to use in the optimization. Current options are ‘mutual information’ (default) or ‘sum of squares’.

  • region (dbdicom.Series, optional) – Series with region of interest to restrict the alignment. The translation will be chosen based on the goodness of the alignment in the bounding box of this region. If none is provided, the entire volume is used. Defaults to None.

  • margin (float, optional) – in case a region is provided, this specifies a margin (in mm) to take around the region. Default is 0 (no margin).

Returns:

list of 3-element numpy arrays with values of the translation that maps the moving volume onto the static volume. The list has one entry per slice of the volume.

Return type:

np.ndarray