Skip to content

Commit a24fb5e

Browse files
committed
Add docstring usage for optional arguments
Signed-off-by: Kheil-Z <[email protected]>
1 parent 930f21b commit a24fb5e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

monai/networks/nets/voxelmorph.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,12 @@ class serves as a wrapper that concatenates the input pair of moving and fixed i
405405
fixed = torch.randn(1, 1, 160, 192, 224)
406406
warped, ddf = net(moving, fixed)
407407
408+
# Example with optional moving_seg and fixed_keypoints
409+
moving_seg = torch.randint(0, 4, (1, 1, 160, 192, 224)).float()
410+
moving_seg = one_hot(moving_seg, num_classes=4)
411+
fixed_keypoints = torch.tensor([[[80, 96, 112], [40, 48, 56]]]).float()
412+
warped_img, warped_seg, warped_keypoints, ddf = net( moving, fixed, moving_seg=moving_seg, fixed_keypoints=fixed_keypoints )
413+
408414
"""
409415

410416
def __init__(

0 commit comments

Comments
 (0)