Skip to content

update box_start/end for deepgrow#2088

Merged
Nic-Ma merged 2 commits into
Project-MONAI:masterfrom
rijobro:deepgrow_spatialcrop
Apr 26, 2021
Merged

update box_start/end for deepgrow#2088
Nic-Ma merged 2 commits into
Project-MONAI:masterfrom
rijobro:deepgrow_spatialcrop

Conversation

@rijobro

@rijobro rijobro commented Apr 26, 2021

Copy link
Copy Markdown
Contributor

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

rijobro commented Apr 26, 2021

Copy link
Copy Markdown
Contributor Author

@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

Nic-Ma commented Apr 26, 2021

Copy link
Copy Markdown
Contributor

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

rijobro commented Apr 26, 2021

Copy link
Copy Markdown
Contributor Author

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

@Nic-Ma Nic-Ma left a comment

Copy link
Copy Markdown
Contributor

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.

@SachidanandAlle SachidanandAlle left a comment

Copy link
Copy Markdown
Contributor

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