Menu

Module providing common Brain MRI Augmentation Methods for PyTorch.

Note

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

class brainrise.utils.Transform[source]

A base class for transformations.

classmethod apply(arr, fct, *args, **kwargs)[source]

Apply transformation to data.

Parameters

arr : array or list of array

the input data.

fct : callable or str

the transformation function.

kwargs : dict

the function parameters.

Returns

transformed : array or list of array

the transformed input data.

classmethod max(arr, axis=None)[source]

Return the maximum along a given axis.

Parameters

arr : array or list of array

input array.

Returns

ndim : int

the array number of dimensions.

classmethod ndim(arr)[source]

Number of array dimensions.

Parameters

arr : array or list of array

input array.

Returns

ndim : int

the array number of dimensions.

classmethod shape(arr)[source]

Return the shape of an array.

Parameters

arr : array or list of array

input array.

Returns

shape : tuple of int

the elements of the shape tuple give the lengths of the corresponding array dimensions.

Follow us

© 2023, brainrise developers