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

update box_start/end for deepgrow #2088

Merged
merged 2 commits into from
Apr 26, 2021

Conversation

rijobro
Copy link
Contributor

@rijobro rijobro commented Apr 26, 2021

Fixes #2087.

Description

Update method for getting start and stop of bounding box from slices.

Status

Ready

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • 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.
  • In-line docstrings updated.
  • Documentation updated, tested make html command in the docs/ folder.

Signed-off-by: Richard Brown <33289025+rijobro@users.noreply.github.com>
@rijobro
Copy link
Contributor Author

rijobro commented Apr 26, 2021

@Nic-Ma hopefully this addresses that issue, but I guess the code is untested as the deepgrow unit tests passed prior to these changes. Have you got example code that would previously cause an error? Hopefully we can turn a simplified version of that into a new unit test.

@Nic-Ma
Copy link
Contributor

Nic-Ma commented Apr 26, 2021

Hi @rijobro ,

Thanks very much for your quick fix!
This case only run when if np.all(np.less(current_size, self.spatial_size)), and the unit test of this transform doesn't cover it:
https://github.com/Project-MONAI/MONAI/blob/master/tests/test_deepgrow_transforms.py#L357
Could you please help add 1 case to test your PR?

Thanks in advance.

Signed-off-by: Richard Brown <33289025+rijobro@users.noreply.github.com>
@rijobro
Copy link
Contributor Author

rijobro commented Apr 26, 2021

The added test passes, but I'm not really sure if it's correct or not. Could you check?

Copy link
Contributor

@Nic-Ma Nic-Ma left a comment

Choose a reason for hiding this comment

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

Looks good to me.
@SachidanandAlle , could you please also help review it?

Thanks.

Copy link
Contributor

@SachidanandAlle SachidanandAlle left a comment

Choose a reason for hiding this comment

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

LGTM

@Nic-Ma Nic-Ma merged commit dde1100 into Project-MONAI:master Apr 26, 2021
@rijobro rijobro deleted the deepgrow_spatialcrop branch May 4, 2021 10:37
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.

DeepGrow transform broken as SpatialCrop changed properties
3 participants