patch_denoise.gpu.main.main_gpu#
- patch_denoise.gpu.main.main_gpu(input_data: ~numpy._typing._array_like.NDArray, *, patch_shape: tuple[int, int, int, int], patch_overlap: tuple[int, int, int, int], mask_threshold: float, recombination: str, method: str, mask: ~numpy._typing._array_like.NDArray | None, noise_std: ~numpy._typing._array_like.NDArray | float | None = None, batch_size: int = 0, extra_output: ~patch_denoise.space_time.base.ExtraOutput = <ExtraOutput: 0>, **kwargs)[source]#
Denoise loop for the gpu version of patch-denoise.
- 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
- noise_std: float or numpy.ndarray
An estimation of the spatial noise map standard deviation.
- extra_output: ExtraOutput, optional
Bitmask of which optional outputs to return.
- Returns:
(denoised, weights, var_map, rank_map, counts); any entry not requested viaextra_outputisNone.- Return type: