adding more nodes

This commit is contained in:
2026-04-03 23:11:52 -07:00
parent 5d4c6dfcea
commit 7747c1c7bc
146 changed files with 4950 additions and 145 deletions

33
docs/nodes/Grain Mark.md Normal file
View File

@@ -0,0 +1,33 @@
# Grain Mark
Mark grains by thresholding height, slope magnitude, or curvature. Thresholds are relative (01) to the data range. Small regions below min_size pixels are removed. Equivalent to Gwyddion's grain_mark.c module.
## Inputs
| Name | Type | Required | Description |
|------|------|----------|-------------|
| field | DATA_FIELD | Yes | Input surface |
## Outputs
| Name | Type | Description |
|------|------|-------------|
| mask | IMAGE | Binary mask of marked grains |
## Controls
| Name | Type | Default | Description |
|------|------|---------|-------------|
| criterion | dropdown | height | What to threshold: height, slope, or curvature |
| threshold_low | FLOAT | 0.3 | Lower bound of the normalized threshold range (01) |
| threshold_high | FLOAT | 1.0 | Upper bound of the normalized threshold range (01) |
| min_size | INT | 10 | Minimum grain size in pixels; smaller regions are removed (1100000) |
| inverted | BOOLEAN | False | Invert the mask to mark valleys instead of peaks |
## Notes
- Thresholds are relative to the data range: 0.0 = minimum value, 1.0 = maximum value.
- "slope" uses Sobel gradient magnitude — useful for marking edges and steep features.
- "curvature" uses the Laplacian — useful for marking bumps or pits regardless of absolute height.
- Use inverted=True to mark valleys, pores, or depressions instead of raised features.
- For Otsu-based automatic thresholding, use the Threshold Mask node instead.