nidl.transforms: Available transformations¶
This modules details the public API you should use and implement for a nidl compatible transform, as well as the transforms available in nidl.
Introduction¶
A transform is an object that can be called on some data and is capable of modifying some properties to generate new data.
Instanciation¶
The transform __init__ method only accepts the
probability that this transform will be applied. It should not take the data
as an argument, as this is left to the __call__ method.
Composability¶
Transforms can be composed using the torchvision.transforms.Compose
class to create directed acyclic graphs defining the probability that each
transform will be applied.
Reproducibility¶
When transforms are instantiated, we typically need to pass values that
will be used to sample the transform parameters when the
__call__ method of the transform is called, i.e., when
the transform instance is called.
All random transforms have a seed parameter to have a corresponding
deterministic behaviour.
Base Classes¶
Base classes for all augmentations and various utility functions.
|
Abstract class for all nidl transformations. |
|
Identity transformation. |
|
Multi-views transformation. |
|
Transformation applied to a 3d volume. |
Volume¶
Preprocessing¶
Classes that implement useful spatial and intensity pre-processing transformations on brain 3D volumes.
|
Rescale intensities in a 3d volume to a given range. |
|
Normalize a 3d volume by removing the mean and scaling to unit variance. |
|
Crop and/or pad a 3d volume to match the target shape. |
|
Resample a 3d volume to a different physical space. |
|
Resize a 3d volume to match a target shape. |
classDiagram
Resample <|-- Resize
VolumeTransform <|-- CropOrPad
VolumeTransform <|-- Resample
VolumeTransform <|-- RobustRescaling
VolumeTransform <|-- ZNormalization
Augmentations¶
Classes that implement augmentations on brain 3D volumes and various utility functions.
|
Blur a 3d volume using a Gaussian filter with random kernel size. |
|
Add Gaussian noise to input data with random parameters. |
|
Randomly erases boxes in a 3d volume. |
|
Reverse the order of elements in a 3d volume along the given axes. |
|
Crop a random portion of a 3d volume and resize it. |
|
Randomly rotates a 3d volume by 90-degree multiples around spatial axes. |
classDiagram
VolumeTransform <|-- RandomErasing
VolumeTransform <|-- RandomFlip
VolumeTransform <|-- RandomGaussianBlur
VolumeTransform <|-- RandomGaussianNoise
VolumeTransform <|-- RandomResizedCrop
VolumeTransform <|-- RandomRotation
Surface¶
Classes that implement augmentations on brain surface and various utility functions.
coming soon