Description
Applies a morphological dilation filter to an IMcImage.
-
Return Type
-
A McImage object.
The resulting IMcImage.
-
Syntax
-
object.Dilate ([nPasses], [Shape], [vSourceImg], [vMaskImg])
The Dilate Method syntax has these parts: |
| object | An expression evaluating to an object of type McMorpho. | | nPasses | Optional. A Long value.
Number of iterations.
The NumPasses property is used if this parameter is omitted or negative.
enum mcMorphoShape - Shape : The structuring element used by the dilation.
| | Shape | Optional. A mcMorphoShape enumeration, as described in settings. | | vSourceImg | Optional. A Variant value. Optional input IMcImage.
| | vMaskImg | Optional. A Variant value. Optional mask IMcImage. If UseActiveFrameRange is FALSE, then the mask ActiveFrame is used to mask each frame in the destination image frame range. If UseActiveFrameRange is TRUE, then the shorter of the two frame ranges is used.
| Settings The settings for Shape are:
 | mcmsDefault | -1 |
Apply the Structuring Element specified in McMorpho.Shape.
|
 | mcms2x2Square | 0 |
A 2 by 2, square Structuring Element.
|
 | mcms3x1Row | 1 |
A 3 pixels horizontal Structuring Element.
|
 | mcms1x3Column | 2 |
A 3 pixels vertical Structuring Element.
|
 | mcms3x3Cross | 3 |
A cross like Structuring Element (4-Connectivity).
|
 | mcms3x3Square | 8 |
A 3 by 3, square Structuring Element (8-Connectivity).
|
 | mcms5x5Octagon | 4 |
The smallest octagonal Structuring Element.
|
 | mcms7x7Octagon | 6 |
The smallest octagonal Structuring Element.
|
 | mcms11x11Octagon | 7 |
A 11 by 11 octagon.
|
 | mcmsCustomKernel | 5 |
Apply the Structuring Element provided in McMorpho.Kernel.
|
Remarks
If Shape is msCustomKernel, the Kernel property will be used as the structuring element (iterating on all the kernel instances if Kernel contains several of them).
If vMaskImg is not empty, this operation performs a dilation, ANDing the result with vMaskImg after each iteration. The dilation performed is either a ms3x3Cross or ms3x3Square. This operation can be used to combine multiple segmentation methods, by dilating the more selective method against the mask of a less selective method, and obtaining results where both segmentation methods found objects.
Exceptions
The exception mceINVALIDARG (E_INVALIDARG) will be thrown if one of the parameters is invalid.
|