12.1. Align Sections (Misorientation)
Group (Subgroup)
Reconstruction (Alignment)
Description
This Filter aligns serial sections (2D slices stacked along the Z-direction) by finding the shift that minimizes the crystal orientation mismatch between cells on neighboring slices. This is the most commonly used alignment method for EBSD data because it directly uses the orientation information measured at each point.
When to Use This Method
Use this method when your data contains crystal orientation measurements (quaternions or Euler angles) and you want to align sections based on the actual crystallographic content. This works well for most EBSD datasets. For data without orientation information, consider the Align Sections (Feature Centroid) or Align Sections (Mutual Information) methods instead.
How This Filter Works
The filter uses an iterative grid search to find the optimal alignment for each pair of neighboring sections:
For a given relative position of two sections, calculate the misorientation between each Cell on the lower section and the Cell directly above it on the upper section
Count the number of cell pairs whose misorientation exceeds the user-defined tolerance. This count is the “misalignment score” for that position – lower is better
Evaluate the misalignment score at all 49 positions in a 7x7 grid (shifting the upper section from -3 to +3 cells in both X and Y)
Select the position with the lowest misalignment score
Re-center the 7x7 grid on the best position and repeat until the best position no longer changes
Repeat for each pair of neighboring sections
Local Minima Warning
This iterative grid search is similar to a downhill simplex optimization and can get caught in a local minimum. If alignment results look incorrect, try adjusting the misorientation tolerance or consider using the Align Sections (Feature Centroid) method, which does not have this limitation.
Masking
If a mask array is provided, Cells flagged as false are excluded from the alignment calculation. This is useful for ignoring regions of bad data or regions outside the sample boundary.
Linear Background Subtraction
Some combinations of sample geometry and internal features can cause the alignment to introduce a gradual “shear” across the sample. Enabling Linear Background Subtraction corrects for this by fitting a line to the X and Y shifts along the Z-direction and removing the linear trend. This effectively keeps the top and bottom sections of the sample fixed relative to each other.
Optional Output Data
The user can optionally have the shifts that are generated by the filter stored in various DataArrays in a new Attribute Matrix.
The structure for which looks like this
|-- Image Geometry
|-- Alignment Shifts Data
|-- Slices
|-- Relative Shifts
|-- Cumulative Shifts
In this new structure, what follows is what the created structures represent:
Alignment Shifts Data (Attribute Matrix) - The tuple size here is defined by the number of slices [ie the Z Dimension of the Image Geometry]
Slices (DataArray | 2 component) - The slice indices (stored as uint32s)
Relative Shifts (DataArray | 2 component) - The slices shift relative to previous shift (stored as int64s) [previously known as
newxshiftandnewyshift]Cumulative Shifts (DataArray | 2 component) - The slice’s accumulated shift (stored as int64s)
In previous versions a file would have been produced instead. If you wish to recreate this, you can write the Attribute Matrix as a CSV/Text file.
Required Input Sources
Cell Quaternions – typically read from EBSD data via Read H5EBSD, Read CTF Data, or Read ANG Data.
Cell Phases – typically read from EBSD data alongside the quaternions.
Crystal Structures – ensemble-level array read from EBSD data or created by Create Ensemble Info.
Mask (optional) – a boolean array marking valid cells, typically produced by a threshold operation such as Multi-Threshold Objects.
Input Parameter(s)
Parameter Name |
Parameter Type |
Parameter Notes |
Description |
|---|---|---|---|
Misorientation Tolerance (Degrees) |
Scalar Value |
Float32 |
Tolerance used to decide if Cells above/below one another should be considered to be the same. The value selected should be similar to the tolerance one would use to define Features (i.e., 2-10 degrees) |
Optional Data Mask
Parameter Name |
Parameter Type |
Parameter Notes |
Description |
|---|---|---|---|
Use Mask Array |
Bool |
Whether to remove some Cells from consideration in the alignment process |
|
Cell Mask Array |
Array Selection |
Allowed Types: uint8, boolean Comp. Shape: 1 |
Path to the DataArray Mask |
Input Cell Data
Parameter Name |
Parameter Type |
Parameter Notes |
Description |
|---|---|---|---|
Selected Image Geometry |
Geometry Selection |
Image |
The target geometry on which to perform the alignment |
Cell Quaternions |
Array Selection |
Allowed Types: float32 Comp. Shape: 4 |
Specifies the orientation of the Cell in quaternion representation |
Cell Phases |
Array Selection |
Allowed Types: int32 Comp. Shape: 1 |
Specifies to which Ensemble each cell belongs |
Input Ensemble Data
Parameter Name |
Parameter Type |
Parameter Notes |
Description |
|---|---|---|---|
Crystal Structures |
Array Selection |
Allowed Types: uint32 Comp. Shape: 1 |
Enumeration representing the crystal structure for each Ensemble |
Optional Alignment Output
Parameter Name |
Parameter Type |
Parameter Notes |
Description |
|---|---|---|---|
Store Alignment Shifts |
Bool |
Whether to store the shifts applied to each section to a collection of Arrays in a new Attribute Matrix |
|
Alignment Attribute Matrix Name |
DataObjectName |
The output attribute matrix where the shifts applied to the section to be stored as DataArrays. |
|
Alignment Slices Data Array Name |
DataObjectName |
The output array name where the slice information related to shifts will be stored. |
|
Alignment Relative Shifts Data Array Name |
DataObjectName |
The output array name where the new shifts relative to previous slice information will be stored. |
|
Alignment Cumulative Shifts Data Array Name |
DataObjectName |
The output array name where the accumulated shift information will be stored. |
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.