Skip to content

Commit 69f78cb

Browse files
committed
Batch 3, Tier 2 Filters reviewed
1 parent 279922b commit 69f78cb

6 files changed

Lines changed: 191 additions & 69 deletions

File tree

docs/documentation_review_tracker.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
|-------|----------|---------------|---------|-----------|--------|
1313
| 1 | Orientation / Crystallography Statistics | 17 | 17 | 17 | Complete |
1414
| 2 | Alignment Filters | 5 | 5 | 5 | Complete |
15-
| 3 | Segmentation / Feature Identification | 10 | 10 | 1 | In Progress |
15+
| 3 | Segmentation / Feature Identification | 10 | 10 | 6 | In Progress |
1616
| 4 | Neighbor / Kernel Operations | ~12 | 0 | 0 | Not Started |
1717
| 5 | Geometry Creation / Manipulation | ~15 | 0 | 0 | Not Started |
1818
| 6 | Data Manipulation (Copy, Create, Delete, Rename) | ~20 | 0 | 0 | Not Started |
@@ -267,61 +267,61 @@ The following batches have been identified in the design spec but have not yet b
267267

268268
| Filter | Plugin | Status |
269269
|--------|--------|--------|
270-
| ScalarSegmentFeatures | SimplnxCore | Pending |
271-
| CAxisSegmentFeatures | OrientationAnalysis | Pending |
272-
| EBSDSegmentFeatures | OrientationAnalysis | Pending |
273-
| RequireMinimumSizeFeatures | SimplnxCore | Pending |
274-
| ComputeFeatureNeighbors | SimplnxCore | Pending |
270+
| ScalarSegmentFeatures | SimplnxCore | Done |
271+
| CAxisSegmentFeatures | OrientationAnalysis | Done |
272+
| EBSDSegmentFeatures | OrientationAnalysis | Done |
273+
| RequireMinimumSizeFeatures | SimplnxCore | Done |
274+
| ComputeFeatureNeighbors | SimplnxCore | Done |
275275

276-
- [ ] **ScalarSegmentFeaturesFilter** (SimplnxCore)
276+
- [x] **ScalarSegmentFeaturesFilter** (SimplnxCore)
277277
- **Clarity:** Burn algorithm steps clear, but term "burn algorithm" undefined; no introduction to what segmentation accomplishes conceptually.
278278
- **Completeness:** Neighbor scheme well documented with 4 paired figure sets. No guidance on tolerance values (tolerance is in whatever units the scalar array uses).
279279
- **Accessibility:** "Cells" and "Features" used without first-use definition; bold emphasis is stylistic rather than explanatory.
280280
- **Figures Needed:** Neighbor-scheme figures already excellent; could add a simple "what is segmentation" before/after conceptual diagram.
281281
- **Real-World Viz:** Before/after FeatureIds map from a scalar-based segmentation (e.g., image-quality thresholding).
282282
- **Units Clarity:** Tolerance has no explicit units — depends entirely on input array data type; this must be stated.
283283
- **Concept Links:** Feature IDs, burn algorithm, segmentation, Cell vs Feature data
284-
- **Notes:** Structural twin of CAxisSegment/EBSDSegment. Shares neighbor scheme figures. Add short intro explaining what segmentation produces (FeatureIds) and how to pick a tolerance.
284+
- **Changes Made:** Added lead-in describing the FeatureIds output and cross-referencing the two orientation-based segment filters. Added "What is Feature Segmentation?" conceptual section. Rewrote algorithm into a burn-algorithm step list. Added "Tolerance and Units" section with concrete examples for integer phase maps, 0-1 image quality, and 0-255 grayscale. Added "Mask Array" and "Periodic Option" sections. Added Required Input Sources with cross-plugin links.
285285

286-
- [ ] **CAxisSegmentFeaturesFilter** (OrientationAnalysis)
286+
- [x] **CAxisSegmentFeaturesFilter** (OrientationAnalysis)
287287
- **Clarity:** Brief C-axis definition provided, but assumes hexagonal-system knowledge; no guidance on when to use this vs EBSDSegmentFeatures.
288288
- **Completeness:** Shares structure and neighbor scheme figures with other segment filters. Missing: explicit hexagonal-only warning, phase handling, when-to-use guidance.
289289
- **Accessibility:** `<001>`, hexagonal system, C-axis all used without plain-language expansion.
290290
- **Figures Needed:** Reuse hexagonal C-axis figure from ComputeAvgCAxes (Batch 1); add a "C-axis misalignment between two neighboring cells" diagram.
291291
- **Real-World Viz:** Before/after segmentation on hexagonal (e.g., Ti) EBSD data.
292292
- **Units Clarity:** Tolerance is in **degrees** — must be stated explicitly in the parameter description.
293293
- **Concept Links:** C-axis, hexagonal materials, burn algorithm, reference frames
294-
- **Notes:** Link to ComputeAvgCAxes for the C-axis explanation. Add "When to Use" guidance — hexagonal-only, when grain distinction needs to come from C-axis alignment rather than full orientation.
294+
- **Changes Made:** Added explicit hexagonal-only warning at the top with cross-references to alternative segment filters. Added "When to Use This Filter" explaining why C-axis alignment is the right criterion for hexagonal materials and when to use misorientation-based segmentation instead. Rewrote algorithm steps; added "Tolerance and Units" with degree units and typical values (1-3 / 5 / 10+). Added Required Input Sources linking ComputeAvgCAxes for C-axis concept.
295295

296-
- [ ] **EBSDSegmentFeaturesFilter** (OrientationAnalysis)
296+
- [x] **EBSDSegmentFeaturesFilter** (OrientationAnalysis)
297297
- **Clarity:** Generic term "misorientation" used without definition; core burn algorithm clear but domain context missing.
298298
- **Completeness:** No guidance on typical tolerance values (5° is the common industry default for grain segmentation); no mention of how multiple phases are handled.
299299
- **Accessibility:** Assumes EBSD workflow and misorientation knowledge.
300300
- **Figures Needed:** Misorientation angle diagram (shared with Batch 1 misorientation concept work); before/after segmentation example.
301301
- **Real-World Viz:** EBSD IPF map → segmented grains visualization — this is one of the highest-value workflow visualizations in DREAM3DNX.
302302
- **Units Clarity:** Tolerance is in **degrees** — must be stated explicitly.
303303
- **Concept Links:** misorientation, EBSD workflow, burn algorithm, reference frames, grain segmentation
304-
- **Notes:** This is the flagship segmentation filter for EBSD workflows. Needs a "Typical Values" section (5° for most grain segmentation; tighter for subgrain analysis).
304+
- **Changes Made:** Added "What is Misorientation-Based Segmentation?" section explaining grains and misorientation for non-experts. Rewrote algorithm into numbered burn steps including symmetry handling. Added "Typical Tolerance Values" section with industry default, 2-3° for subgrains, 10-15° high-angle cutoff. Added "Phase Handling" explaining different-phase and phase-0 behavior. Added "Mask Array" and "Periodic Option" sections. Added Required Input Sources.
305305

306-
- [ ] **RequireMinimumSizeFeaturesFilter** (SimplnxCore)
306+
- [x] **RequireMinimumSizeFeaturesFilter** (SimplnxCore)
307307
- **Clarity:** Core action (remove features below size threshold) clear, but "isotropically coarsened" is unexplained jargon.
308308
- **Completeness:** Has good warnings (feature data invalidation, NeighborList removal); no guidance on typical minimum-size values.
309309
- **Accessibility:** "Ensemble" bolded but not defined; "isotropically coarsened" needs a plain-language explanation.
310310
- **Figures Needed:** Before/after showing small features removed and gaps filled; diagram of isotropic coarsening (neighbors growing outward uniformly).
311311
- **Real-World Viz:** Before/after microstructure with minimum-size filter applied.
312312
- **Units Clarity:** Minimum size is in **cells** (integer voxel count) — must be stated explicitly.
313313
- **Concept Links:** feature cleanup, isotropic coarsening, Ensemble, NeighborList invalidation
314-
- **Notes:** Define "isotropically coarsened" (neighboring features grow outward uniformly to fill removed-voxel gaps). State units on the minimum-size parameter.
314+
- **Changes Made:** Added lead-in explaining typical use (discarding spurious single-cell grains after segmentation). Added "What is Isotropic Coarsening?" section with plain-language explanation. Added "Minimum Size Units" section stating units are **cells** (integer voxel count), with a formula for converting physical volume to cell count. Rewrote the "Single Phase" option more clearly. Kept existing warnings. Added Required Input Sources.
315315

316-
- [ ] **ComputeFeatureNeighborsFilter** (SimplnxCore)
316+
- [x] **ComputeFeatureNeighborsFilter** (SimplnxCore)
317317
- **Clarity:** Algorithm steps clear, but the multiple output arrays are described inline in running prose and hard to scan.
318318
- **Completeness:** Mentions several outputs (neighbor count, shared surface area, boundary-cell count, surface-feature flag) but all buried in a single paragraph.
319319
- **Accessibility:** Face-sharing neighbor concept not illustrated; implicit assumption that user knows what a NeighborList is.
320320
- **Figures Needed:** Diagram showing feature-to-feature shared boundary with shared surface area highlighted.
321321
- **Real-World Viz:** Grain map colored by number of neighbors; or shared-surface-area visualization.
322322
- **Units Clarity:** Shared surface area is in **cell-face units** (dimensionless count of shared faces, not physical area) — should be stated.
323323
- **Concept Links:** contiguous neighbors, Feature IDs, shared surface area, NeighborList
324-
- **Notes:** Restructure output descriptions as a bulleted list instead of one prose paragraph. Explain what each output array is used for downstream.
324+
- **Changes Made:** Rewrote lead-in describing why downstream filters depend on this (misorientation stats, GBCD, twin merging, boundary strengths). Separated algorithm steps from output descriptions. Added "What This Filter Produces" section with bulleted list of the three main outputs plus two optional outputs; explained each output's downstream use. Explicitly stated shared surface area units are **cell-face count**, not physical area. Added Required Input Sources.
325325

326326
### Tier 3 — Polish
327327

src/Plugins/OrientationAnalysis/docs/CAxisSegmentFeaturesFilter.md

Lines changed: 38 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,35 @@ Reconstruction (Segmentation)
66

77
## Description
88

9-
This **Filter** segments the **Features** by grouping neighboring **Cells** that satisfy the *C-axis misalignment tolerance*, i.e., have misalignment angle less than the value set by the user. The *C-axis misalignment* refers to the angle between the <001> directions (C-axis in the hexagonal system) that is present between neighboring **Cells**. The process by which the **Features** are identified is given below and is a standard *burn algorithm*.
9+
This **Filter** groups neighboring **Cells** (voxels) whose crystal C-axes are nearly aligned into **Features** (grains), producing a *FeatureIds* array that labels every cell in the input **Image Geometry** with a grain number.
1010

11-
1. Randomly select a **Cell**, add it to an empty list and set its *Feature Id* to the current **Feature**
12-
2. Compare the **Cell** to each of its six (6) face-sharing neighbors (i.e., calculate the c-axis misalignment with each neighbor)
13-
3. Add each neighbor **Cell** that has a C-axis misalignment below the user defined tolerance to the list created in 1. and set the *Feature Id* of the neighbor **Cell** to the current **Feature**
14-
4. Remove the current **Cell** from the list and move to the next **Cell** and repeat 2. and 3.; continue until no **Cells** are left in the list
15-
5. Increment the current **Feature** counter and repeat steps 1. through 4.; continue until no **Cells** remain unassigned in the dataset
11+
This filter is **only valid for hexagonal phases**. For general EBSD grain segmentation (cubic, orthorhombic, or any other symmetry), use [Segment Features (Misorientation)](EBSDSegmentFeaturesFilter.md) instead; for scalar-based segmentation, use [Segment Features (Scalar)](../SimplnxCore/ScalarSegmentFeaturesFilter.md).
1612

17-
The user has the option to *Use Mask Array*, which allows the user to set a boolean array for the **Cells** that remove **Cells** with a value of *false* from consideration in the above algorithm. This option is useful if the user has an array that either specifies the domain of the "sample" in the "image" or specifies if the orientation on the **Cell** is trusted/correct.
13+
### When to Use This Filter
1814

19-
After all the **Features** have been identified, a **Feature Attribute Matrix** is created for the **Features** and each **Feature** is flagged as *Active* in a boolean array in the matrix.
15+
In hexagonal materials (titanium, magnesium, zinc, zirconium, etc.), the [C-axis](ComputeAvgCAxesFilter.md) is the unique, mechanically significant crystal direction. For many studies -- especially those focused on basal-plane slip, texture, or deformation -- it is more informative to group cells by how closely their C-axes point in the same direction than by their full orientation. Two cells may have very different full orientations (rotated differently about their own C-axis) but still belong to the same grain if their C-axes point the same way.
16+
17+
If you need full misorientation-based grain segmentation (accounting for rotations about the C-axis), use [Segment Features (Misorientation)](EBSDSegmentFeaturesFilter.md) instead.
18+
19+
### How This Filter Works
20+
21+
The filter uses a standard *burn algorithm* to grow each feature outward from a seed cell:
22+
23+
1. Randomly pick an unassigned **Cell** and give it a new *Feature Id*.
24+
2. Compute the angle between the C-axis of the seed cell and the C-axis of each neighbor (see **Neighbor Scheme** below).
25+
3. Any neighbor whose C-axis misalignment angle is less than the user-specified *Misalignment Tolerance* (in **degrees**) is added to the current feature and gets the same *Feature Id*.
26+
4. Repeat step 2-3 from each newly added cell, growing the feature outward until no more neighbors qualify.
27+
5. Increment the feature counter and pick a new unassigned seed cell. Continue until every eligible cell has been assigned.
28+
29+
The C-axis direction for each cell is computed on-the-fly from the cell's orientation quaternion. See [Compute Average C-Axis Orientations](ComputeAvgCAxesFilter.md) for a full explanation of the C-axis concept and why it only makes physical sense for hexagonal symmetries.
30+
31+
### Tolerance and Units
32+
33+
The *Misalignment Tolerance* is in **degrees**. Typical values:
34+
35+
- **1-3 degrees** -- very tight; splits grains with even slight C-axis variation (subgrains).
36+
- **5 degrees** -- the common default for grain segmentation.
37+
- **10+ degrees** -- loose; merges adjacent grains whose C-axes are within a cone.
2038

2139
### Neighbor Scheme
2240

@@ -25,11 +43,7 @@ The *Neighbor Scheme* parameter provides the following choices:
2543
- **Face Neighbors [0]**: Only the 6 face-sharing neighbors of a voxel are considered during segmentation.
2644
- **All Connected Neighbors [1]**: All 26 neighbors connected by a face, edge, or vertex are considered during segmentation.
2745

28-
## Note on Neighbor Scheme
29-
30-
Historically DREAM.3D version 6.x has used *only* the 6 face neighbors of a voxel. This release introduces the option
31-
of using all 26 neighboring voxels that are connected by a face, edge or vertex. The default for the filter
32-
is to still use the 6 face neighbors ("Face Only") in order to stay consistent with the output from DREAM.3D version 6.x.
46+
DREAM.3D version 6.x only used face neighbors. The default here is still *Face Only* for backward compatibility.
3347

3448
| Neighbor Scheme = "Face Only" | Neighbor Scheme = "All Connected" |
3549
|:--:|:--:|
@@ -47,6 +61,17 @@ is to still use the 6 face neighbors ("Face Only") in order to stay consistent w
4761
|:--:|:--:|
4862
| ![Shared Edges & Points With Disconnected Region - "Face Only"](Images/SegmentFeatures/combination_face_only.png) | ![Shared Edges & Points With Disconnected Region - "All Connected"](Images/SegmentFeatures/combination_all_connected.png) |
4963

64+
### Mask Array
65+
66+
If *Use Mask Array* is enabled, cells flagged *false* in the mask are excluded from segmentation and left with a Feature Id of 0. Masks are commonly used to restrict segmentation to the sample region or to cells with reliable orientation data (for example, a threshold on an EBSD confidence index).
67+
68+
### Required Input Sources
69+
70+
- **Cell Quaternions** -- typically read from EBSD data via [Read H5EBSD](ReadH5EbsdFilter.md), [Read CTF Data](ReadCtfDataFilter.md), or [Read ANG Data](ReadAngDataFilter.md); can also be produced from Euler angles by [Convert Orientations](ConvertOrientationsFilter.md).
71+
- **Cell Phases** -- typically read from EBSD data alongside the quaternions.
72+
- **Crystal Structures** -- ensemble-level array read from EBSD data or created by [Create Ensemble Info](CreateEnsembleInfoFilter.md). Phases that are not hexagonal will produce invalid segmentation for those cells.
73+
- **Mask Array** (optional) -- a boolean array marking valid cells, typically produced by [Multi-Threshold Objects](../SimplnxCore/MultiThresholdObjectsFilter.md).
74+
5075
% Auto generated parameter table will be inserted here
5176

5277
## Example Pipelines

0 commit comments

Comments
 (0)