CFwhm:SetCentroid


The SetCentroid method sets the centroid properties but not the FWHM calculation properties of the CFwhm object.

Syntax

CFwhm:SetCentroid( CCentroid )

CFwhm:SetCentroid( CFwhm )

where

    The first form copies the properties of a CCentroid object.

    The second form copies only the CCentroid properties from another CFwhm object.

Example

The following script updates the cenroid properties of a FWHM measurements and then remeasures. Assume that a CImage object I already exists:

 

C = CCentroid:new()

-- create a CCentroid

C.radiusX = 7.3 ; C.radiusY = 6.4

-- change the radius properties

 

-- do something

F = CFwhm:new()

-- create CFwhm A with default values

F = F:Calc( I, 420, 600 )

-- measure the object near 420,600

Printf("%lg,%lg = %lg", F.X(), F.Y(), F:FWHM() )

-- result: 420.24,599.872 = 2.145

F:SetCentroid( C )

-- change the centroid properties

Printf("%lg,%lg = %lg", F.X(), F.Y(), F:FWHM() )

-- result: 420.21,599.884 = 2.138

Related Topics

Calc

CFwhm Class Properties

CFwhm Class