Skip to content

Commit 92fa732

Browse files
docs(transforms): add Returns and Raises sections to spatial_resample docstring (#9068)
Signed-off-by: Luchang Jiang <auroral.sunflower@gmail.com>
1 parent fb5b7f2 commit 92fa732

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

monai/transforms/spatial/functional.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,13 @@ def spatial_resample(
137137
dtype_pt: data `dtype` for resampling computation.
138138
lazy: a flag that indicates whether the operation should be performed lazily or not
139139
transform_info: a dictionary with the relevant information pertaining to an applied transform.
140+
141+
Returns:
142+
torch.Tensor: The resampled output tensor, with metadata preserved when metadata tracking is enabled.
143+
144+
Raises:
145+
ValueError: If the affine or spatial dimensions are invalid, or if the output spatial size cannot be
146+
computed.
140147
"""
141148
original_spatial_shape = img.peek_pending_shape() if isinstance(img, MetaTensor) else img.shape[1:]
142149
src_affine: torch.Tensor = img.peek_pending_affine() if isinstance(img, MetaTensor) else torch.eye(4)

0 commit comments

Comments
 (0)