IMcRefFeaturesDuplicate Method |
![]() |
Namespace: MediaCy.IQL.Features
Function Duplicate As McRefFeatures
'Example 1. Make region centroid distance measurements to both lines and points Dim myRegionToPointRef As McRefFeatures Set myRegionToPointRef = ThisApplication.ActiveImage.RegionFeatures.Reference.Duplicate Set myRegionToPointRef.ReferenceFeature = ThisApplication.ActiveImage.PointFeatures Dim myRegionToLineRef As McRefFeatures Set myRegionToLineRef = ThisApplication.ActiveImage.RegionFeatures.Reference.Duplicate Set myRegionToLineRef.ReferenceFeature = ThisApplication.ActiveImage.LineFeatures Debug.Print "Distance from Centroids to ref point = " & _ McToText( myRegionToPointRef.mRefDistance) & vbCrlf & _ "Distance from Centroids to ref line = " & _ McToText( myRegionToLineRef.mRefDistance) 'Example 2. Use CreateOperator to create a named McRefFeatures operator ' and use it to get distance from the Aoi's to a ref point CreateOperator "McRefFeatures", ThisApplication.ActiveImage.Aoi, "RefPoint" Set ThisApplication.ActiveImage.Aoi.RefPoint.ReferenceFeature = ThisApplication.ActiveImage.PointFeatures Debug.Print "Distance from Aoi centroids to ref point = " & _ McToText( ThisApplication.ActiveImage.Aoi.RefPoint.mRefDistance)