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 indices
generate_label_classes_crop_centers to subsample and generate spatial coordinates
RandCropByLabelClasses combines 1, 2 and output image patches
Describe 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
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_indicesto identify all feasible sampling indicesgenerate_label_classes_crop_centersto subsample and generate spatial coordinatesRandCropByLabelClassescombines 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