KeepLargestComponent
KeepLargestComponent
Bases: LabelTransform
Keep only the largest connected component in a binary label map.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**kwargs
|
See |
required |
Note
For now, this transform only works for binary images, i.e., label maps with a background and a foreground class. If you are interested in extending this transform, please open a new issue.
__call__(data)
Transform data and return a result of the same type.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
TypeTransformInput
|
Instance of |
required |
to_hydra_config()
Return a dictionary representation of the transform for Hydra instantiation.