patch_denoise.denoise.mp_pca#
- patch_denoise.denoise.mp_pca(input_data, patch_shape, patch_overlap, mask=None, mask_threshold=50, recombination='weighted', threshold_scale=1.0, progbar=None)[source]#
Marshenko-Pastur PCA denoising method.
- 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.
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”.
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
threshold_scale (float) – An extra factor for the patch denoising.
- Returns:
numpy.ndarray: The denoised sequence of volume numpy.ndarray: The weight of each pixel after the processing. numpy.ndarray: If possible, the noise variance distribution in the volume numpy.ndarray: If possible, the rank of each patch in the volume.
- Return type:
Notes
Follows implementation of [1] and the one available in dipy.
References