Skip to content

Commit

Permalink
Fix typo (Project-MONAI#7321)
Browse files Browse the repository at this point in the history
Fix typo.

### Types of changes
<!--- Put an `x` in all the boxes that apply, and remove the not
applicable items -->
- [x] Non-breaking change (fix or new feature that would not break
existing functionality).
- [ ] Breaking change (fix or new feature that would cause existing
functionality to change).
- [ ] New tests added to cover the changes.
- [ ] Integration tests passed locally by running `./runtests.sh -f -u
--net --coverage`.
- [ ] Quick tests passed locally by running `./runtests.sh --quick
--unittests --disttests`.
- [ ] In-line docstrings updated.
- [ ] Documentation updated, tested `make html` command in the `docs/`
folder.

---------

Signed-off-by: YunLiu <55491388+KumoLiu@users.noreply.github.com>
Signed-off-by: Yu0610 <612410030@alum.ccu.edu.tw>
  • Loading branch information
KumoLiu authored and Yu0610 committed Apr 11, 2024
1 parent 5707e8d commit f5f5c1e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion monai/metrics/hausdorff_distance.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def compute_hausdorff_distance(
y[b, c],
distance_metric=distance_metric,
spacing=spacing_list[b],
symetric=not directed,
symmetric=not directed,
class_index=c,
)
percentile_distances = [_compute_percentile_hausdorff_distance(d, percentile) for d in distances]
Expand Down
2 changes: 1 addition & 1 deletion monai/metrics/surface_dice.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ def compute_surface_dice(
distance_metric=distance_metric,
spacing=spacing_list[b],
use_subvoxels=use_subvoxels,
symetric=True,
symmetric=True,
class_index=c,
)
boundary_correct: int | torch.Tensor | float
Expand Down
2 changes: 1 addition & 1 deletion monai/metrics/surface_distance.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def compute_average_surface_distance(
y[b, c],
distance_metric=distance_metric,
spacing=spacing_list[b],
symetric=symmetric,
symmetric=symmetric,
class_index=c,
)
surface_distance = torch.cat(distances)
Expand Down
6 changes: 3 additions & 3 deletions monai/metrics/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ def get_edge_surface_distance(
distance_metric: str = "euclidean",
spacing: int | float | np.ndarray | Sequence[int | float] | None = None,
use_subvoxels: bool = False,
symetric: bool = False,
symmetric: bool = False,
class_index: int = -1,
) -> tuple[
tuple[torch.Tensor, torch.Tensor],
Expand All @@ -314,7 +314,7 @@ def get_edge_surface_distance(
See :py:func:`monai.metrics.utils.get_surface_distance`.
use_subvoxels: whether to use subvoxel resolution (using the spacing).
This will return the areas of the edges.
symetric: whether to compute the surface distance from `y_pred` to `y` and from `y` to `y_pred`.
symmetric: whether to compute the surface distance from `y_pred` to `y` and from `y` to `y_pred`.
class_index: The class-index used for context when warning about empty ground truth or prediction.
Returns:
Expand All @@ -338,7 +338,7 @@ def get_edge_surface_distance(
" this may result in nan/inf distance."
)
distances: tuple[torch.Tensor, torch.Tensor] | tuple[torch.Tensor]
if symetric:
if symmetric:
distances = (
get_surface_distance(edges_pred, edges_gt, distance_metric, spacing),
get_surface_distance(edges_gt, edges_pred, distance_metric, spacing),
Expand Down

0 comments on commit f5f5c1e

Please sign in to comment.