monai.transforms.utility.array#
A collection of “vanilla” transforms for utility functions.
Classes
|
Appends additional channels encoding coordinates of the input. |
|
Add extreme points of label to the image as a new channel. |
|
Transform points between image coordinates and world coordinates. |
|
Change the channel dimension of the image to the last dimension. |
|
Cast the Numpy data to specified numpy data type, or cast the PyTorch Tensor to specified PyTorch data type. |
|
|
Convert labels to multi channels based on brats18 classes, which include TC (Tumor core), WT (Whole tumor) and ET (Enhancing tumor): label 1 is the necrotic and non-enhancing tumor core, which should be counted under TC and WT subregion, label 2 is the peritumoral edema, which is counted only under WT subregion, label 4 is the GD-enhancing tumor, which should be counted under ET, TC, WT subregions. |
|
|
Wrap a non-randomized cuCIM transform, defined based on the transform name and args. |
|
Utility transform to show the statistics of data for debug or analysis. |
|
Adjust or add the channel dimension of input data to ensure channel_first shape. |
|
Ensure the input data to be a PyTorch Tensor or numpy array, support: numpy array, PyTorch Tensor, float, int, bool, string and object keep the original. |
|
Compute foreground and background of the input label data, return the indices. |
|
Do nothing to the data. |
|
Applies a convolution filter to the input image. |
|
Compute statistics for the intensity values of input image and store into the metadata dictionary. |
|
Convert labels to mask for other tasks. |
|
Apply a user-defined lambda as a transform. |
|
Utility to map label values to another set of values. |
|
Wrap a randomized cuCIM transform, defined based on the transform name and args For deterministic non-randomized transforms use |
|
Do nothing to the data. |
|
Randomly apply a convolutional filter to the input data. |
|
Randomizable version |
|
This is a wrapper for TorchIO randomized transforms based on the specified transform name and args. |
|
This is a wrapper transform for PyTorch TorchVision randomized transform based on the specified transform name and args. |
|
RemoveRepeatedChannel data to undo RepeatChannel The repeats count specifies the deletion of the origin data, for example: |
|
Repeat channel data to construct expected input shape for models. |
|
This is a pass through transform to be used for testing purposes. |
|
Given an image of size X along a certain dimension, return a list of length X containing images. |
|
Squeeze a unitary dimension. |
|
Converts the input data to CuPy array, can support list or tuple of numbers, NumPy and PyTorch Tensor. |
|
Move PyTorch Tensor to the specified device. |
|
Converts the input data to numpy array, can support list or tuple of numbers and PyTorch Tensor. |
|
Converts the input image (in the form of NumPy array or PyTorch Tensor) to PIL image |
|
Converts the input image to a tensor without applying any other transformations. |
|
This is a wrapper for TorchIO non-randomized transforms based on the specified transform name and args. |
|
This is a wrapper transform for PyTorch TorchVision non-randomized transform based on the specified transform name and args. |
|
Transposes the input image based on the given indices dimension ordering. |