Skip to content

Commit 8518493

Browse files
Copilotfepegar
andauthored
Restore FPG example in Transpose docstring while keeping fixed indentation
Agent-Logs-Url: https://github.com/TorchIO-project/torchio/sessions/ec33801f-bfdb-463c-a1e3-b2a08bbaa548 Co-authored-by: fepegar <12688084+fepegar@users.noreply.github.com>
1 parent 5bc10be commit 8518493

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

src/torchio/transforms/preprocessing/spatial/transpose.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@ class Transpose(SpatialTransform):
1010
all voxels in the input and output spaces match.
1111
1212
Examples:
13-
>>> import torch
1413
>>> import torchio as tio
15-
>>> image = tio.ScalarImage(tensor=torch.rand(1, 256, 256, 176))
14+
>>> image = tio.datasets.FPG().t1
15+
>>> image
16+
ScalarImage(shape: (1, 256, 256, 176); spacing: (1.00, 1.00, 1.00); orientation: PIR+; ...)
1617
>>> transposed = tio.Transpose()(image)
17-
>>> transposed.shape
18-
torch.Size([1, 176, 256, 256])
18+
>>> transposed
19+
ScalarImage(shape: (1, 176, 256, 256); spacing: (1.00, 1.00, 1.00); orientation: RIP+; ...)
1920
"""
2021

2122
def apply_transform(self, subject: Subject) -> Subject:

0 commit comments

Comments
 (0)