sksurgerycore.algorithms.errors module

Registration Error Calculations

sksurgerycore.algorithms.errors.compute_fre(fixed, moving, rotation, translation)[source]

Computes the Fiducial Registration Error, equal to the root mean squared error between corresponding fiducials.

Parameters:
  • fixed – point set, N x 3 ndarray
  • moving – point set, N x 3 ndarray of corresponding points
  • rotation – 3 x 3 ndarray
  • translation – 3 x 1 ndarray
Returns:

Fiducial Registration Error (FRE)

sksurgerycore.algorithms.errors.compute_fre_from_fle(fiducials, mean_fle_squared)[source]

Computes an estimation of FRE from FLE and a list of fiducial locations.

See: Fitzpatrick (1998), equation 10.

Parameters:
  • fiducials – Nx3 ndarray of fiducial points
  • mean_fle_squared – expected (mean) FLE squared
Returns:

mean FRE squared

sksurgerycore.algorithms.errors.compute_tre_from_fle(fiducials, mean_fle_squared, target_point)[source]

Computes an estimation of TRE from FLE and a list of fiducial locations.

See: Fitzpatrick (1998), equation 46.

Parameters:
  • fiducials – Nx3 ndarray of fiducial points
  • mean_fle_squared – expected (mean) FLE squared
  • target_point – a point for which to compute TRE.
Returns:

mean TRE squared

sksurgerycore.algorithms.errors.validate_procrustes_inputs(fixed, moving)[source]

Validates the fixed and moving set of points

  1. fixed and moving must be numpy array
  2. fixed and moving should have 3 columns
  3. fixed and moving should have at least 3 rows
  4. fixed and moving should have the same number of rows
Parameters:
  • fixed – point set, N x 3 ndarray
  • moving – point set, N x 3 ndarray of corresponding points
Returns:

nothing

Raises:

TypeError, ValueError