Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BoxToMask - explicit check for box extending over image shape #6637

Merged
merged 2 commits into from
Jun 22, 2023

Conversation

kretes
Copy link
Contributor

@kretes kretes commented Jun 21, 2023

Fixes an unclear error message when BoxToMask is called with box extending over passed spatial shape. Currently user face a numpy value broadcast error.

Description

An explicit check for box values vs spatial_size

Types of changes

  • 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.

Copy link
Contributor

@wyli wyli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Signed-off-by: Tomasz Bartczak <kretesenator@gmail.com>
@kretes kretes force-pushed the box_to_mask_explicit_error branch from 582baf4 to 2ecd048 Compare June 22, 2023 05:45
@wyli
Copy link
Contributor

wyli commented Jun 22, 2023

/build

@wyli wyli enabled auto-merge (squash) June 22, 2023 15:56
@wyli
Copy link
Contributor

wyli commented Jun 22, 2023

/build

1 similar comment
@wyli
Copy link
Contributor

wyli commented Jun 22, 2023

/build

@wyli wyli merged commit 6de86a4 into Project-MONAI:dev Jun 22, 2023
drbeh pushed a commit to drbeh/MONAI that referenced this pull request Jun 26, 2023
…t-MONAI#6637)

Fixes an unclear error message when BoxToMask is called with box
extending over passed spatial shape. Currently user face a numpy value
broadcast error.

### Description

An explicit check for box values vs `spatial_size`

### 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).
- [x] 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`.

Signed-off-by: Tomasz Bartczak <kretesenator@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants