AdaptiveDenoiser#

class patch_denoise.space_time.lowrank.AdaptiveDenoiser(patch_shape, patch_overlap, method='SURE', recombination='weighted', nbsim=500)[source]#

Bases: BaseSpaceTimeDenoiser

Adaptive Denoiser.

Parameters:
  • patch_shape (tuple) – The patch shape

  • patch_overlap (tuple) – the overlap of each pixel

  • recombination (str, optional) – The recombination method of the patch. “weighted”, “average” or “center”. default “weighted”.

Methods

__init__

denoise

Adaptive denoiser.

_patch_processing(patch, patch_idx=None, gamma0=None, tau0=None, var_apriori=None, method=None, nbsim=None)[source]#

Process a patch.

Implemented by child classes.

denoise(input_data, mask=None, mask_threshold=50, tau0=None, noise_std=None, gamma0=None, progbar=None)[source]#

Adaptive denoiser.

Perform the denoising using the adaptive trace norm estimator. [1]

Parameters:
  • input_data (numpy.ndarray) – The input data to denoise. It should be a ND array, and the last dimension should a dynamically varying one (eg time).

  • progbar (tqdm.tqdm Progress bar, optiononal) – An existing Progressbar, default (None) will create a new one.

mask: numpy.ndarray

A boolean array, defining a ROI in the volume. Only patch with voxels in the ROI will be processed.

mask_threshold: int

percentage of the path that has to be in the mask so that the patch is processed. if mask_threshold = -1, all the patch are processed, if mask_threshold=100, all the voxels of the patch needs to be in the mask

noise_std: float or numpy.ndarray

An estimation of the spatial noise map standard deviation.

References