volume#
- voxel.volume.stack(*vols) Volume#
Concatenate (stack) multiple volumes channel-wise. Assumes the volumes are in the same image space (with the same base shape).
- Parameters:
*vols (Volume) – Volumes to merge.
- Returns:
Volume – Single channel-stacked volume instance.
- voxel.volume.volume_grid(baseshape, transform=None, localshape=None, device=None) Tensor#
Construct a grid of 3D voxel coordinates of the shape (W, H, D, 3).
- Parameters:
baseshape (Size) – Spatial (3D) shape of the volume grid.
transform (AffineMatrix, optional) – Grid voxel coordinate transform.
localshape (Size, optional) – If provided, the grid is normalized to the range [-1, 1] using this spatial shape and the coordinate order is swapped (for torch sampling methods).
device (device, optional) – Device on which to allocate the grid data.
- Returns:
Tensor – Grid volume tensor.