Click or drag to resize

IMcPointsGetFeatures Method

Copies selected features into a new McFeatures interface.

Namespace:  MediaCy.IQL.Features
Assembly:  MediaCy.IQL.Features (in MediaCy.IQL.Features.dll) Version: 10.0.6912.0
Syntax
VB
Function GetFeatures ( 
	<OptionalAttribute> varSelector As Object
) As Object

Parameters

varSelector (Optional)
Type: SystemObject

Return Value

Type: Object
A newly created McFeatures-derived interface (McPoints, McLines or McRegions) containing the selected features.

Implements

IMcFeaturesGetFeatures(Object)
Remarks
This method creates a new McFeatures instance, which will have the same parent McImage (if any) that this one has. To extract features into a McFeature associated with another McImage, you would create the target McFeatures and then use CopyFrom to copy in the desired features to that instance. The newly created McFeatures will have the same OptionFlags, calibration and FeatureStatusFlags properties as the source. However, the new features will have new Identifier numbers. And any existing DisplayOverlays collection is not copied, so you must set this up if you want the new features to be displayed.
Examples
VB
'For multiple AOI's set each AOI sub-region to a brighter intensity
Sub SetEachAOIBrighter()
With ThisApplication.ActiveImage.Aoi
Dim nR As Long
If .Count = 0 Then Exit Sub
For nR = 0 To .Count - 1
Dim mcregionsOne As McRegions
Set mcregionsOne = .GetFeatures(nR)
Dim mcregionaccessOne As McRegionAccess
Set mcregionaccessOne = mcregionsOne.AccessMaskedImageData
Dim dValue As Double
dValue = (ActiveImage.RangeMax / .Count) * nR
mcregionaccessOne.SetToConstant dValue
Next nR
End With 'ActiveImage.Aoi
End Sub 'SetEachAOIBrighter
See Also