Apply Dewarp Parameters¶
Group (Subgroup)¶
Processing (Processing)
Description¶
This Filter takes a set of dewarp parameters stored in a DataArray generated in the CalcDewarpParameters filter and uses them to dewarp tiles within a GridMontage. The parameters are expected to be in the format
x' = a0 * x + a1 * y + a2 * x2 + a3 * y2 + a4 * xy + a5 * x2y + a6 * xy2
y' = b0 * x + b1 * y + b2 * x2 + b3 * y2 + b4 * xy + b5 * x2y + b6 * xy2
where X and Y are offset by half of the target tile dimensions instead of starting at the tile's top-left corner. The target tile dimensions are taken from the first or second row/column based on the number of rows and columns in the montage. If there are more than two rows, the target height is taken from the second row. Otherwise, the target height is taken from the first row. If there are more than two columns, the target width is taken from the second column. Otherwise, the target width is taken from the first column. It is done this way because the last row and column are not guaranteed to be full size, while the first row and column may be larger than the others with said region containing possible junk data. By finding the appropriate tile size, the correct offsets for the algorithm can be determined and junk data discarded.
Warping is done around the center of each tile using a set of global im_dim_x/y values for the montage. These values are still used for the first and last row/col where tiles may be larger or smaller than the others in order to maintain consistent warping. For the first row and column, the offset based on (im_dim_x, im_dim_y) tile sizes is extended with any additional width or height beyond the target size being added or subtracted accordingly. For cases where the last row or column do not contain the entire (im_dim_x, im_dim_y) tile size, the data is still warped around the center point of an (im_dim_x, im_dim_y) sized tile
The value for each point in the transformed montage is determined by mapping each point in the new data to a point in the original data instead of mapping the old data to the new tiles and blending the overlaps. The calculations for the original data points from the new is as follows:
x'n = xnew - im_dim_x / 2
y'n = ynew - im_dim_y / 2
x'old = a0 * x'n + a1 * y'n + a2 * x'n2 + a3 * y'n2 + a4 * x'ny'n + a5 * x'n2y'n + a6 * x'ny'n2
y'old = b0 * x'n + b1 * y'n + b2 * x'n2 + b3 * y'n2 + b4 * x'ny'n + b5 * x'n2y'n + b6 * x'ny'n2
xold = x'old + im_dim_x / 2
yold = y'old + im_dim_y / 2
Parameters¶
Name | Type | Description |
---|---|---|
GridMontage | GridMontage | Montage to dewarp |
Attribute Matrix Name | Text | Name of the AttributeMatrix that should be dewarped for each tile |
Transform Array | DataArrayPath | DataArrayPath to the transformation parameters |
Required Geometry¶
Not Applicable
Required Objects¶
Not Applicable
Created Objects¶
Kind | Default Name | Type | Component Dimensions | Description |
---|---|---|---|---|
Data Container Prefix | Transformed_ | N/A | N/A | Prefix to apply for dewarped DataContainers and GridMontage |
Attribute Array | Mask | uint8_t | (1) | Name of the created Mask array for each dewarped DataContainer |
Example Pipelines¶
None
License & Copyright¶
Please see the description file distributed with this plugin.
DREAM3D Mailing Lists¶
If you need more help with a filter, please consider asking your question on the DREAM3D Users mailing list: DREAM.3D Users Google group!