Note

This page is a reference documentation. It only explains the class signature, and not how to use it. Please refer to the user guide for the big picture.

nidl.transforms.volume.augmentation.RandomGibbsNoise

class nidl.transforms.volume.augmentation.RandomGibbsNoise(alpha=(0.0, 1.0), **kwargs)[source]

Bases: VolumeTransform

Random Gibbs ringing (MRI artifact) in a 3d volume.

Keeps the k-space frequencies within a sphere of radius (1 - \alpha) \frac{\sqrt{2}}{2} \max(H, W, D). As in MONAI, for even sizes and \alpha close to 1 the output can be 0. Reimplementation of MONAI’s RandGibbsNoise [1] (Apache-2.0).

Parameters:
alpha: (float, float), default=(0.0, 1.0)

Range of \alpha, within [0, 1].

kwargs: dict

Keyword arguments.

References

[1]

Cardoso, M. J., et al., “MONAI: An open-source framework for deep learning in healthcare.” arXiv, 2022. https://arxiv.org/abs/2211.02701

__init__(alpha=(0.0, 1.0), **kwargs)[source]
apply_transform(data)[source]

Add Gibbs ringing.

Parameters:
data: np.ndarray or torch.Tensor

The input volume.

Returns:
data: np.ndarray or torch.Tensor

Volume with ringing, same type and shape as the input.