nighres.intensity.lcpca_denoising(image_list, phase_list=None, ngb_size=4, stdev_cutoff=1.05, min_dimension=0, max_dimension=-1, unwrap=True, process_2d=False, use_rmt=False, save_data=False, overwrite=False, output_dir=None, file_names=None)[source]

LCPCA denoising

Denoise multi-contrast data with a local complex-valued PCA-based method

  • image_list ([niimg]) – List of input images to denoise
  • phase_list ([niimg], optional) – List of input phase to denoise (order must match that of image_list)
  • ngb_size (int, optional) – Size of the local PCA neighborhood, to be increased with number of inputs (default is 4)
  • stdev_cutoff (float, optional) – Factor of local noise level to remove PCA components. Higher values remove more components (default is 1.05)
  • min_dimension (int, optional) – Minimum number of kept PCA components (default is 0)
  • max_dimension (int, optional) – Maximum number of kept PCA components (default is -1 for all components)
  • unwrap (bool, optional) – Whether to unwrap the phase data of keep it as is, assuming radians (default is True)
  • process_2d (bool, optional) – Whether to denoise in 2D, for instance when acquiring a thin slab of data (default is False)
  • use_rmt (bool, optional) – Whether to use random matrix theory rather than noise fitting to estimate the noise threshold (default is False)
  • 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_names ([str], optional) – Desired base names for output files with file extension (suffixes will be added)

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

  • denoised ([niimg]): The list of denoised input images (_lcpca_den)
  • dimensions (niimg): Map of the estimated local dimensions (_lcpca_dim)
  • residuals (niimg): Estimated residuals between input and denoised images (_lcpca_err)

Return type:



Original Java module by Pierre-Louis Bazin. Algorithm adapted from [1] with a different approach to set the adaptive noise threshold and additional processing to handle the phase data.


[1]Manjon, Coupe, Concha, Buades, Collins, Robles (2013). Diffusion Weighted Image Denoising Using Overcomplete Local PCA doi:10.1371/journal.pone.0073021