Description

Applies a morphological erosion filter to an IMcImage.

Return Type

A McImage object.  

The resulting IMcImage.

Syntax

object.Erode ([nPasses], [Shape], [vSourceImg])

The Erode Method syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type McMorpho.
nPassesOptional. A Long value.

Number of iterations. The NumPasses property is used if this parameter is omitted or negative.

ShapeOptional. A mcMorphoShape enumeration, as described in settings.

The structuring element used by the erosion.

vSourceImgOptional. A Variant value.

Optional input IMcImage.

Settings

The settings for Shape are:

ConstantValueDescription
 mcmsDefault-1

Apply the Structuring Element specified in McMorpho.Shape.

 mcms2x2Square0

A 2 by 2, square Structuring Element.

 mcms3x1Row1

A 3 pixels horizontal Structuring Element.

 mcms1x3Column2

A 3 pixels vertical Structuring Element.

 mcms3x3Cross3

A cross like Structuring Element (4-Connectivity).

 mcms3x3Square8

A 3 by 3, square Structuring Element (8-Connectivity).

 mcms5x5Octagon4

The smallest octagonal Structuring Element.

 mcms7x7Octagon6

The smallest octagonal Structuring Element.

 mcms11x11Octagon7

A 11 by 11 octagon.

 mcmsCustomKernel5

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).

Exceptions

The exception mceINVALIDARG (E_INVALIDARG) will be thrown if one of the parameters is invalid.