Describe the bug
The original discussion was in PR comment:
#7893 (comment)
Will a refactor of the erodeand dilate functions make it easier in different applications/networks/pre-processing?
https://github.com/Project-MONAI/MONAI/blob/dev/monai/apps/generation/maisi/utils/morphological_ops.py
Expected behavior
class Erode3D(Transform):
...
# erode with a 3D filter when needed
input_img = torch.rand(b, l, h, d)
eroder = Erode3D(...)
output = eroder(input_img)