RemoveRegions class
Remove small, large or all but largest regions from a segmentation image.
Contents
- Reference
Uses RegionProperties internally to extract all regions, and the instance segmentation image, and then LabelModifier to modify the segmentation.
Inputs:
- 0: Image segmentation
Outputs:
- 0: Image segmentation
Base classes
- class ProcessObject
- Abstract base class for all process objects.
Public functions
- auto create(bool removeAllButLargest, int largestRegionsToKeep, float minArea, float maxArea) -> std::shared_ptr<RemoveRegions>
- Create instance.
Private functions
- void execute() override
Function documentation
std::shared_ptr<RemoveRegions> fast:: RemoveRegions:: create(bool removeAllButLargest,
int largestRegionsToKeep,
float minArea,
float maxArea)
Create instance.
| Parameters | |
|---|---|
| removeAllButLargest | Removes all regions except the largest. This is equivalent to setting largestRegionsToKeep = 1. |
| largestRegionsToKeep | If set to N > 0, all regions except the N largest regions are removed. This parameter takes precedence over removeAllButLargest. If set, minArea and maxArea are still used if set. |
| minArea | Minimum area (in millimeters if pixel spacing exist). All regions with area less than this are removed. |
| maxArea | Maximum area (in millimeters if pixel spacing exist). All regions with area more than this are removed. |
| Returns | instance |