Skip to content

Commit 7c9e273

Browse files
committed
docs: address CodeRabbit review on #8826
- vista3d/inferer.py: clarify spatial-axis indices for [N,C,W,H,D] tensor (axes 2-4, not 0-2) in point_based_window_inferer inputs docstring. - visualize/utils.py: fix matshow3d docstring typos ('dim and reshape' -> 'then reshaped'; 'dimensionas' -> 'dimension as'). Signed-off-by: Soumya Snigdha Kundu <soumya_snigdha.kundu@kcl.ac.uk>
1 parent 4cb8977 commit 7c9e273

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

monai/apps/vista3d/inferer.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,10 @@ def point_based_window_inferer(
4545
patch inference and average output stitching, and finally returns the segmented mask.
4646
4747
Args:
48-
inputs: [1CWHD], input image to be processed (axis 0 is columns/Width,
49-
axis 1 is rows/Height, axis 2 is Depth, matching arrays returned by
50-
MONAI's NIfTI/ITK readers).
48+
inputs: [1CWHD], input image to be processed (spatial axes are in
49+
Width, Height, Depth order; i.e., for [N, C, W, H, D], Width is
50+
axis 2, Height is axis 3, Depth is axis 4, matching arrays
51+
returned by MONAI's NIfTI/ITK readers).
5152
roi_size: the spatial window size for inferences.
5253
When its components have None or non-positives, the corresponding inputs dimension will be used.
5354
if the components of the `roi_size` are non-positive values, the transform will use the

monai/visualize/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ def matshow3d(
6565
figsize: size of the figure.
6666
frames_per_row: number of frames to display in each row. If None, sqrt(firstdim) will be used.
6767
frame_dim: for higher dimensional arrays, which dimension from (`-1`, `-2`, `-3`) is moved to
68-
the `-3` dimension. dim and reshape to (-1, spatial0, spatial1) shape to construct frames,
68+
the `-3` dimension, then reshaped to (-1, spatial0, spatial1) to construct frames,
6969
default to `-3`.
7070
channel_dim: if not None, explicitly specify the channel dimension to be transposed to the
71-
last dimensionas shape (-1, spatial0, spatial1, C). this can be used to plot RGB color image.
71+
last dimension as shape (-1, spatial0, spatial1, C). this can be used to plot RGB color image.
7272
if None, the channel dimension will be flattened with `frame_dim` and `batch_dim` as
7373
shape (-1, spatial0, spatial1).
7474
note that it can only support 3D input image. default is None.

0 commit comments

Comments
 (0)