Skip to content

Conversation

@wyli
Copy link
Contributor

@wyli wyli commented Dec 7, 2020

Description

a transform that computes nd coordinates of a bounding rectangle from the positive intensities.

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.
  • Quick tests passed locally by running ./runtests.sh --quick.
  • In-line docstrings updated.
  • Documentation updated, tested make html command in the docs/ folder.

@wyli wyli requested a review from Nic-Ma December 7, 2020 18:35
@wyli wyli force-pushed the adds-a-bounding-box-transform branch from a92c729 to ef13d97 Compare December 7, 2020 18:39
@wyli wyli requested a review from ericspod December 7, 2020 18:53
wyli added 2 commits December 7, 2020 20:21
Signed-off-by: Wenqi Li <wenqil@nvidia.com>
Signed-off-by: Wenqi Li <wenqil@nvidia.com>
@wyli wyli force-pushed the adds-a-bounding-box-transform branch from ef13d97 to 95ce69e Compare December 7, 2020 20:21
@Nic-Ma
Copy link
Contributor

Nic-Ma commented Dec 8, 2020

Hi @wyli ,

I think the existing generate_spatial_bounding_box API may already support this feature?
https://github.com/Project-MONAI/MONAI/blob/master/monai/transforms/utils.py#L508
I think you can enhance the existing API if can't satisfy your request.

Thanks.

@wyli
Copy link
Contributor Author

wyli commented Dec 8, 2020

Hi @wyli ,

I think the existing generate_spatial_bounding_box API may already support this feature?
https://github.com/Project-MONAI/MONAI/blob/master/monai/transforms/utils.py#L508
I think you can enhance the existing API if can't satisfy your request.

Thanks.

that implementation is 3 times slower than this one. the root cause is that we don't really need to compute 'nonzero_idx = np.nonzero(data)' in order to get the bounding box. I don't have enough time to revise the existing API for now.

@Nic-Ma
Copy link
Contributor

Nic-Ma commented Dec 8, 2020

OK, let's merge this one first. Then I will try to combine with the existing API soon.

Thanks.

@Nic-Ma Nic-Ma merged commit 4907f39 into Project-MONAI:master Dec 8, 2020
@wyli wyli deleted the adds-a-bounding-box-transform branch April 29, 2021 11:04
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