phase_unwrapping

nighres.intensity.phase_unwrapping(image, mask=None, nquadrants=3, tv_flattening=False, tv_scale=0.5, save_data=False, overwrite=False, output_dir=None, file_name=None)[source]

Fast marching phase unwrapping

Fast marching method for unwrapping phase images, based on _[1]

Parameters:
  • image (niimg) – Input phase image to unwrap
  • mask (niimg, optional) – Data mask to specify acceptable seeding regions
  • nquadrants (int, optional) – Number of image quadrants to use (default is 3)
  • tv_flattening (bool, optional) – Whether or not to run a post-processing step to remove background phase variations with a total variation filter (default is False)
  • tv_scale (float, optional) – Relative intensity scale for the TV filter (default is 0.5)
  • save_data (bool) – Save output data to file (default is False)
  • overwrite (bool) – Overwrite existing results (default is False)
  • output_dir (str, optional) – Path to desired output directory, will be created if it doesn’t exist
  • file_name (str, optional) – Desired base name for output files with file extension (suffixes will be added)
Returns:

Dictionary collecting outputs under the following keys (suffix of output files in brackets)

  • result (niimg): The unwrapped image rescaled in radians

Return type:

dict

Notes

Original Java module by Pierre-Louis Bazin. Algorithm adapted from [1] with additional seeding in multiple image quadrants to reduce the effects of possible phase singularities

References

[1]Abdul-Rahman, Gdeisat, Burton and Lalor. Fast three-dimensional phase-unwrapping algorithm based on sorting by reliability following a non-continuous path. doi: 10.1117/12.611415