Data augmentation
Transforms wrapper
CustomDictTransform
CustomDictTransform (aug)
A class that serves as a wrapper to perform an identical transformation on both the image and the target (if it’s a mask).
Vanilla transforms
do_pad_or_crop
do_pad_or_crop (o, target_shape, padding_mode, mask_name, dtype=<class 'torch.Tensor'>)
PadOrCrop
PadOrCrop (size, padding_mode=0, mask_name=None)
Resize image using TorchIO CropOrPad
.
ZNormalization
ZNormalization (masking_method=None, channel_wise=True)
Apply TorchIO ZNormalization
.
BraTSMaskConverter
BraTSMaskConverter (enc=None, dec=None, split_idx=None, order=None)
Convert BraTS masks.
BinaryConverter
BinaryConverter (enc=None, dec=None, split_idx=None, order=None)
Convert to binary mask.
RandomGhosting
RandomGhosting (intensity=(0.5, 1), p=0.5)
Apply TorchIO RandomGhosting
.
RandomSpike
RandomSpike (num_spikes=1, intensity=(1, 3), p=0.5)
Apply TorchIO RandomSpike
.
RandomNoise
RandomNoise (mean=0, std=(0, 0.25), p=0.5)
Apply TorchIO RandomNoise
.
RandomBiasField
RandomBiasField (coefficients=0.5, order=3, p=0.5)
Apply TorchIO RandomBiasField
.
RandomBlur
RandomBlur (std=(0, 2), p=0.5)
Apply TorchIO RandomBiasField
.
RandomGamma
RandomGamma (log_gamma=(-0.3, 0.3), p=0.5)
Apply TorchIO RandomGamma
.
RandomMotion
RandomMotion (degrees=10, translation=10, num_transforms=2, image_interpolation='linear', p=0.5)
Apply TorchIO RandomMotion
.
Dictionary transforms
RandomElasticDeformation
RandomElasticDeformation (num_control_points=7, max_displacement=7.5, image_interpolation='linear', p=0.5)
Apply TorchIO RandomElasticDeformation
.
RandomAffine
RandomAffine (scales=0, degrees=10, translation=0, isotropic=False, image_interpolation='linear', default_pad_value=0.0, p=0.5)
Apply TorchIO RandomAffine
.
RandomFlip
RandomFlip (axes='LR', p=0.5)
Apply TorchIO RandomFlip
.
OneOf
OneOf (transform_dict, p=1)
Apply only one of the given transforms using TorchIO OneOf
.