10.126. Remove Minimum Size Features
Group (Subgroup)
Processing (Cleanup)
Description
This Filter removes small Features from a segmented dataset and fills in the space they leave behind by expanding their neighbors. Features whose cell count is below the user-specified Minimum Allowed Features Size are erased; the remaining features grow outward into the erased cells until every cell is reassigned to a surviving feature.
This is typically used immediately after segmentation (Segment Features (Misorientation) or similar) to discard spurious single-cell or few-cell “grains” that are almost always noise rather than real features.
How This Filter Works
For each Feature, look up its cell count from the input Feature Num. Cells array.
If the feature’s count is below the threshold, mark it for removal. All of its cells are temporarily set to Feature Id 0 (“unassigned”).
After all small features are removed, the remaining features are isotropically coarsened to fill the gaps.
What is Isotropic Coarsening?
“Isotropic coarsening” is an iterative dilation that grows each surviving feature outward by one cell layer at a time, uniformly in all directions. On each pass, an unassigned cell is given the Feature Id of whichever neighbor feature touches it; if multiple features touch it, one is picked. The process repeats until no unassigned cells remain. The result is that every removed cell is absorbed into the closest surviving feature, with no preferred direction.
Minimum Size Units
The Minimum Allowed Features Size is in cells (integer voxel count), not physical units. A threshold of 10 means “remove any feature with fewer than 10 cells,” regardless of the image’s spacing. To convert a physical-volume threshold into a cell count, divide by the product of the cell spacing (dx * dy * dz).
Entering a number larger than the size of the largest feature produces an error, since every feature would be removed. If the size distribution is unknown, compute feature sizes first with Compute Feature Sizes and inspect the range.
Apply to Single Phase
When Apply to Single Phase is enabled, the size threshold is applied only to features of the specified phase. Features of other phases are untouched regardless of their size. This is useful when small features are noise in one phase but meaningful in another (e.g., small precipitates in a matrix).
WARNING: Feature Data Will Become Invalid
By modifying the cell-level Feature Ids, any feature-level data that was previously computed (sizes, centroids, average orientations, etc.) will almost certainly be invalid after this filter runs. Re-run any feature-level computation filters downstream of this one to ensure accurate results.
WARNING: NeighborList Removal
If the Cell Feature Attribute Matrix contains any NeighborList arrays, they will be removed because the list of neighbors for each surviving feature has changed. Re-run Compute Feature Neighbors afterward to rebuild the neighbor relationships.
Required Input Sources
Cell Feature Ids – produced by a segmentation filter such as Segment Features (Misorientation) or Segment Features (Scalar).
Feature Num. Cells – the cell count per feature, produced by Compute Feature Sizes.
Feature Phases (only when Apply to Single Phase is enabled) – produced by Compute Feature Phases.
Input Parameter(s)
Parameter Name |
Parameter Type |
Parameter Notes |
Description |
|---|---|---|---|
Minimum Allowed Features Size |
Scalar Value |
Int64 |
Minimum allowed features size |
Apply to Single Phase |
Bool |
Apply to Single Phase |
|
Phase Index |
Scalar Value |
Int32 |
Target phase to remove |
Input Cell Data
Parameter Name |
Parameter Type |
Parameter Notes |
Description |
|---|---|---|---|
Input Image Geometry |
Geometry Selection |
Image |
The input image geometry (cell) |
Cell Feature Ids |
Array Selection |
Allowed Types: int32 Comp. Shape: 1 |
DataPath to FeatureIds DataArray |
Input Feature Data
Parameter Name |
Parameter Type |
Parameter Notes |
Description |
|---|---|---|---|
Feature Num. Cells Array |
Array Selection |
Allowed Types: int32 Comp. Shape: 1 |
DataPath to NumCells DataArray |
Feature Phases |
Array Selection |
Allowed Types: int32 Comp. Shape: 1 |
DataPath to Feature Phases DataArray |
Example Pipelines
(02) Small IN100 Full Reconstruction
License & Copyright
Please see the description file distributed with this Plugin
DREAM3D-NX Help
If you need help, need to file a bug report or want to request a new feature, please head over to the DREAM3DNX-Issues GitHub site where the community of DREAM3D-NX users can help answer your questions.