Skip to content

Commit

Permalink
update crop_patch_to_mask docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
dkuegler authored and m-reuter committed Jan 23, 2023
1 parent dbfd084 commit 2665f91
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions FastSurferCNN/segstats.py
Original file line number Diff line number Diff line change
Expand Up @@ -549,8 +549,9 @@ def patch_filter(pos: Tuple[int, int, int], mask: npt.NDArray[bool],
def crop_patch_to_mask(mask: npt.NDArray[_NumberType],
sub_patch: Optional[Sequence[slice]] = None) \
-> Tuple[bool, Sequence[slice]]:
"""Crop the patch to regions of the patch that are non-zero. Assumes mask is always positive. Returns whether there
is any mask>0 in the patch and a patch shrunk to mask>0 regions.
"""Crop the patch to regions of the mask that are non-zero. Assumes mask is always positive. Returns whether there
is any mask>0 in the patch and a patch shrunk to mask>0 regions. The optional subpatch constrains this operation to
the sub-region defined by a sequence of slicing operations.
Args:
mask: to crop to
Expand Down

0 comments on commit 2665f91

Please sign in to comment.