sksurgeryfred.algorithms.fle module

Functions for adding fiducial localisation error

class sksurgeryfred.algorithms.fle.FLE(independent_fle=None, ind_fle_function=None, systematic_fle=None, sys_fle_function=None, dimension=3)[source]

Bases: object

Provides methods to add Fiducial Localisation Error to a point

Parameters
  • independent_fle – the magnitude(s) of the independent FLE’s, used for the default ind_fle_function. Do not use if using your own ind_fle_function. A single float will yield isotropic error, or an array can be passed for anisotropic errors.

  • ind_fle_function – the function to use for sampling the independent fle. Defaults to numpy.random.normal

  • systematic_fle – the magnitude(s) of the systematic FLE’s, used for the default sys_fle_function. Do not use if using your own sys_fle_function. A single float will yield isotropic error, or an array can be passed for anisotropic errors.

  • sys_fle_function – the function to use for sampling the independent fle. Defaults to numpy.add

  • dimension – the dimensions to use, defaults to 3.

Raises
  • ValueError – If independent_fle is not single value or array of length dimension.

  • ValueError – If both fle function and fle value are set.

  • TypeError – If either error function is invalid.

perturb_fiducial(fiducial_marker)[source]

Adds the FLE to the marker position

Parameters

fiducial_marker – the true position of the marker.

Returns

The perturbed position of the marker