Skip to content

Refactor morphological functions as transform (or transform utils) #8003

@mingxin-zheng

Description

@mingxin-zheng

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) 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions