add help docs and ?

This commit is contained in:
2026-03-30 23:10:42 -07:00
parent ced43bec4f
commit 63d76bac72
76 changed files with 2184 additions and 1 deletions

View File

@@ -0,0 +1,28 @@
# Grain Filter
Remove grains from a binary mask based on size and border contact. Equivalent to Gwyddion's grain_filter module (grain_filter.c).
## Inputs
| Name | Type | Required | Description |
|------|------|----------|-------------|
| mask | IMAGE | Yes | Binary mask containing grain regions to filter |
## Outputs
| Name | Type | Description |
|------|------|-------------|
| filtered_mask | IMAGE | Binary mask with unwanted grains removed |
## Controls
| Name | Type | Default | Description |
|------|------|---------|-------------|
| min_area | INT | 10 | Discard grains with fewer pixels than this value (0 = no lower limit) |
| max_area | INT | 0 | Discard grains with more pixels than this value (0 = no upper limit) |
| remove_border | BOOLEAN | False | Discard any grain that touches the image edge |
## Limitations
- Grain detection uses 4-connected or 8-connected labeling; the exact connectivity is determined by the implementation.
- min_area and max_area are in pixels, not physical units.