8.3. Align Sections (Feature Centroid)
Group (Subgroup)
Reconstruction (Alignment)
Description
This Filter attempts to align ‘sections’ of the sample perpendicular to the Z-direction by determining the position that closest aligns the centroid(s) of previously defined “regions”. The “regions” are defined by a boolean array where the Cells have been flagged by another Filter. Typically, during reading/processing of the data, each Cell is subject to a “quality metric” (or threshold) that defines if the Cell is good. This threshold can be used to define areas of each slice that are bad, either due to actual features in the microstructure or external references inserted by the user/experimentalist. If these “regions” of bad Cells are believed to be consistent through sections, then this Filter will preserve that by aligning those “regions” on top of one another on consecutive sections. The algorithm of this Filter is as follows:
Determine the centroid of all Cells that are flagged with a boolean value equal to true for each section
Determine the shifts that place centroids of consecutive sections on top of one another
Round the shifts determined in step 2 to the nearest multiple of the Cell resolution. (This forces the sections to be shifted by full Cell increments)
If the user elects to Use Reference Slice, then each section’s centroid is shifted to lie on top of the reference slice’s centroid position and not its neighboring section’s centroid position.
Note that this is algorithm cannot get caught in a local minimum!
The user can also decide to remove a background shift present in the sample. The process for this is to fit a line to the X and Y shifts along the Z-direction of the sample. The individual shifts are then modified to make the slope of the fit line be 0. Effectively, this process is trying to keep the top and bottom section of the sample fixed. Some combinations of sample geometry and internal features can result in this algorithm introducing a ‘shear’ in the sample and the Linear Background Subtraction will attempt to correct for this.
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
|-- Centroids
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)
Centroids (DataArray | 2 component) - The xy centroids of the corresponding slice
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.
Input Parameter(s)
Parameter Name |
Parameter Type |
Parameter Notes |
Description |
|---|---|---|---|
Use Reference Slice |
Bool |
Whether the centroids of each section should be compared to a reference slice instead of their neighboring section |
|
Reference Slice |
Scalar Value |
Int32 |
Slice number to use as reference |
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 |
Mask Array |
Array Selection |
Allowed Types: uint8, boolean Comp. Shape: 1 |
Specifies if the Cell is to be counted in the algorithm. |
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. |
|
Alignment Centroids Data Array Name |
DataObjectName |
The output array name where the centroid information will be stored. |
Example Pipelines
(10) SmallIN100 Full Reconstruction
(03) SmallIN100 Alignment
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.