Morphological Operations
Objectives
This functionality is designed to perform morphological operations (erosion, dilation, closure, opening) using a structural element on a grid from a selection variable. It calculates and stores a selection variable on the grid resulting from the applied transformation.
Interface
-
Input:
- Grid: Select the grid file on which the transformation will take place.
-
The transformation is applied from a selection. Two modes are here available:
- From Selection: if the selection already exists through a variable. In this case you can directly define the selection variable.
- From Filter: the selection does not exist but is created on the fly through a filter. Click the Filter button to open the Sample Filter window and define the variable(s) and the rule(s) you want to apply. Be careful that this selection is volatile and may not be able to be re-used elsewhere.
-
Operation: Select one of the transformations in the list of the corresponding elementary operations.
- Erosion: Performs the morphological erosion operation using the structural element. A grain is transformed into a pore if there is at least one pore in its neighborhood, defined by the structural element.
- Dilation: Performs the morphological dilation operation using the structural element. A pore is replaced by a grain if there is at least one grain in its neighborhood, defined by the structural element.
- Closing: Performs the morphological closing operation using the structural element. It is equivalent to a dilation followed by an erosion, using the same structural element.
- Opening: Performs the morphological opening operation using the structural element. It is equivalent to erosion followed by a dilation, using the same structural element.
-
Structural Element: The structural element is used to apply the morphological operation. It is defined by its extension along the three grid main axes and its shape (rectangular or ellipsoid) which define the extension of a neighborhood. The Rectangular element can be defined by a number of cells or by its dimensions along U/V(/W). In the second case, a rotation can be set.
A Preview enables you to check the extension of the defined neighborhood and the cells which will be affected by the structural element. Be careful using a rectangular element (dimensions) that we include a cell in the neighborhood if the distance between its centroid and the target is less than or equal to the dimension defined. The defined neighborhood is displayed by a red line and the selected cells are represented in green.
-
Output:
-
Choosing the Select only Modified Cells to retain only the cells affected by the morphological operation. For example, if we apply a dilation, only the dilated cells will be defined in the output selection.
- The objective of the Naming Pattern is to help the definition of output selection. You can edit this pattern to modify it and define the name of your choice. Click on
to retrieve the default pattern: %var-%operator if you have chosen the From Selection mode or %filter-%operator if you have chosen the From Filter mode.
-
- Select the Display toggle to display the created selection in a defined scene (2D or 3D depending on your grid dimension) at the end of the run.