-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
A utility function to generate sampling points #6704
Comments
I wrote this helper function with the expectation that the output would be the coordinates of the centers. I hope it meets your requirements.
|
@Yu0610 can you start a PR ? |
Closed
This was referenced Apr 11, 2024
Closed
Closed
ytl0623
added a commit
to ytl0623/MONAI
that referenced
this issue
Apr 25, 2024
Signed-off-by: ytl0623 <[email protected]>
7 tasks
ytl0623
added a commit
to ytl0623/MONAI
that referenced
this issue
Apr 25, 2024
Signed-off-by: ytl0623 <[email protected]>
ytl0623
added a commit
to ytl0623/MONAI
that referenced
this issue
Apr 25, 2024
Signed-off-by: ytl0623 <[email protected]>
ytl0623
added a commit
to ytl0623/MONAI
that referenced
this issue
Apr 25, 2024
Signed-off-by: ytl0623 <[email protected]>
ytl0623
added a commit
to ytl0623/MONAI
that referenced
this issue
Apr 25, 2024
Signed-off-by: ytl0623 <[email protected]>
ytl0623
added a commit
to ytl0623/MONAI
that referenced
this issue
Apr 25, 2024
Signed-off-by: ytl0623 <[email protected]>
KumoLiu
added a commit
that referenced
this issue
May 21, 2024
Fixes #6704 ### Description Combined `map_classes_to_indices` and `generate_label_classes_crop_centers` to a single function `map_and_generate_sampling_centers` in monai.transforms.utils.py. ### Types of changes - [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: ytl0623 <[email protected]> Co-authored-by: Eric Kerfoot <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Yu <[email protected]> Co-authored-by: YunLiu <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
Currently there are a few functions in monai.transforms to help sampling image patches:
map_classes_to_indices
to identify all feasible sampling indicesgenerate_label_classes_crop_centers
to subsample and generate spatial coordinatesRandCropByLabelClasses
combines 1, 2 and output image patchesDescribe the solution you'd like
Would be great to have a helper function to run step 1 and 2 as a single command. The function should output sampling coordinates instead of the final patch
Describe alternatives you've considered
Write the logic with multiple commands: https://gist.github.com/wyli/50c65e686beaf418a32c9cc131f0bdc7
Same idea applies to the other sampling transforms such as RandCropByPosNegLabel
The text was updated successfully, but these errors were encountered: