Click or drag to resize

McMMFeatureSubFeature Property

Return sub-feature by index.

Namespace:  MediaCy.Addins.Measurements
Assembly:  MediaCy.Addins.Measurements (in MediaCy.Addins.Measurements.dll) Version: 3.1.0.0
Syntax
VB
Public ReadOnly Property SubFeature ( 
	Index As Integer,
	Optional IgnoreHidden As Boolean = true
) As McMMSubFeature
	Get

Parameters

Index
Type: SystemInt32
IgnoreHidden (Optional)
Type: SystemBoolean
Index - a 0-based index of sub-feature. IgnoreHidden - whether the index takes into account hidden elements or not.

Return Value

Type: McMMSubFeature
Pointer to sub-feature as McMMSubFeature
Examples
VB
    'print names of all sub-features of a best-fit circle
Sub McMMFeatureExample()
    If ThisApplication.ActiveImage Is Nothing Then
        'load demo image
        ThisApplication.Images.Open(ThisApplication.Path(mcPathType.mcptSampleImages) + "Count And Size\Spots.tif")
    End If
    'add best-fit circle
    Dim md As McMMData = ThisApplication.ActiveImage.MeasurementsData
    md.Add(McMeasurements.enumMMTools.mmtBestFitCircle, New Single() {110, 110, 180, 180, 110, 180})
    Dim mmFeature As McMMFeature
    Dim mmSubFeature As McMMSubFeature
    Dim NSubFeatures As Long, i As Long
    Dim IgnoreHidden As Boolean
    'show all sub-features regardless Show best-fit point flag
    IgnoreHidden = False
    'get last, just added feature - Best-fit circle
    mmFeature = ThisApplication.ActiveImage.MeasurementsData.Item(ThisApplication.ActiveImage.MeasurementsData.Count - 1)
    NSubFeatures = mmFeature.Rows(IgnoreHidden)
    ThisApplication.Output.Show()
    For i = 0 To NSubFeatures - 1
        mmSubFeature = mmFeature.SubFeature(i, IgnoreHidden)
        'print to the Output window
        ThisApplication.Output.PrintMessage(i + 1 + " Name = " + mmSubFeature.Name)
    Next i
End Sub
See Also