Note
This page is a reference documentation. It only explains the class signature, and not how to use it. Please refer to the user guide for the big picture.
nidl.transforms.VolumeTransform¶
- class nidl.transforms.VolumeTransform(p=None)[source]¶
Bases:
TransformTransformation applied to a 3d volume.
- parse_data(data)[source]¶
Checks if the input data shape is 3d or 4d.
- Parameters:
- data: np.ndarray or torch.Tensor
The input data with shape
or

- Returns:
- np.ndarray or torch.Tensor
Data with type and shape checked.
- Raises:
- ValueError
If the input data is not
numpy.ndarrayortorch.Tensoror if the shape is not 3d or 4d.