GaussianNoisePerturbation
Note
This page is a reference documentation. It only explains the class signature, and not how to use it. Please refer to the Habitat Guide and Python API guide (v2.0) for usage.
- class GaussianNoisePerturbation(sigma: float | None = None, noise_method: str = 'chang', roi: str | None = None, round_to_int: bool = False)[source]
Bases:
objectAdd zero-mean Gaussian noise to every image of a subject.
- Parameters:
sigma – Noise standard deviation in intensity units;
Noneestimates it per subject withnoise_method(the paper’s choice, MIRP’s behaviour when no level is configured).noise_method –
"chang"(wavelet estimator) or"roi_std"(standard deviation inside the ROI).roi – Mask key for
roi_stdestimation;Noneuses the subject’s single mask.round_to_int – Round the noisy image to whole numbers, mirroring MIRP’s handling of integer-valued CT (HU) data.
- __init__(sigma: float | None = None, noise_method: str = 'chang', roi: str | None = None, round_to_int: bool = False) None[source]
- __call__(subject: Subject, *, rng: Generator) Subject[source]
Return a copy of
subjectwith Gaussian noise added to all images.- Parameters:
subject – Subject providing the images (and the ROI when the noise level is estimated with
roi_std).rng – Random generator supplying the noise field.
- Returns:
The perturbed subject copy.