12.2. Align Sections (Mutual Information)
Group (Subgroup)
Reconstruction (Alignment)
Description
This Filter aligns serial sections (2D slices stacked along the Z-direction) by maximizing the mutual information between the feature patterns on neighboring slices. Rather than comparing individual cell orientations (as in Align Sections (Misorientation)), this method first groups cells into temporary features on each slice, then finds the shift that best aligns those feature patterns between slices.
When to Use This Method
This method is useful when feature-level pattern matching is more appropriate than cell-level orientation comparison. It can sometimes produce better results than misorientation-based alignment when the data has significant noise or when features are large relative to the misalignment.
What is Mutual Information?
Mutual information is a statistical measure of how much information one variable provides about another. In this context, it measures how well the feature patterns on two neighboring slices correspond to each other. High mutual information means the features on one slice strongly predict the features on the adjacent slice – indicating good alignment.
How This Filter Works
Segment features on each slice: Neighboring cells on each 2D slice are grouped into temporary features using a misorientation tolerance (the same algorithm as Segment Features (Misorientation), applied in 2D). These feature IDs are internal to this filter and are not stored.
Calculate mutual information: For a given relative position of two slices, compute the mutual information between the feature ID patterns on the two slices.
Grid search: Evaluate the mutual information at all 49 positions in a 7x7 grid (shifting the upper slice from -3 to +3 cells in both X and Y). Select the position with the highest mutual information.
Iterate: 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.
Misorientation Tolerance
The misorientation tolerance parameter controls how cells are grouped into temporary features on each slice. Cells whose orientations differ by less than this tolerance are grouped together. Lower values produce more, smaller features; higher values produce fewer, larger features.
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.
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 |
Specifies if the Cell is to be counted in the algorithm. Only required if Use Mask Array is checked. |
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. |
References
Journal articles on Mutual Information that are useful:
Elements of information theory. John Wiley & Sons, New York, NY.Gray, R.M. (1990).
Entropy and Information Theory. Springer-Verlag, New York, NY. Nirenberg, S. and Latham, P.E. (2003).
Decoding neuronal spike trains: how important are correlations? Proc. Natl. Acad. Sci. 100:7348-7353. Shannon, C.E. and Weaver, W. (1949).
The mathematical theory of communication. University of Illinois Press, Urbana, Illinois. M zard, M. and Monatanari, A. (2009).
Information, Physics, and Computation. Oxford University Press, Oxford.
Example Pipelines
AlignSectionsMutualInformation
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.