Click or drag to resize

IMcSpatialCalibsAddDerived Method

Adds a derived calibration to the calibration collection.

Namespace:  MediaCy.IQL.Calibrations
Assembly:  MediaCy.IQL.Calibrations (in MediaCy.IQL.Calibrations.dll) Version: 10.0.6912.0
Syntax
VB
Function AddDerived ( 
	pCalib As McSpatialCalib,
	XBinning As Double,
	YBinning As Double,
	Optional bIgnoreMagModifier As Boolean = false
) As McSpatialCalib

Parameters

pCalib
Type: MediaCy.IQL.CalibrationsMcSpatialCalib
XBinning
Type: SystemDouble
YBinning
Type: SystemDouble
bIgnoreMagModifier (Optional)
Type: SystemBoolean

Return Value

Type: McSpatialCalib
The derived calibration.
Remarks
There are several types of spatial calibrations. Reference calibrations typically correspond to microscope objectives, and are persisted from one application session to the next. Derived calibrations are created by the calibration collection when the system calibration is applied to an image and there is some factor present that modifies the calibration by modifying the effective magnification. Two such factors are Capture binning, where a single pixel of higher intensity is created by combining several neighboring pixels, and Magnification Modifiers (optics in the light path that change the total system magnification). This function creates a derived calibration that compensates for the horizontal and vertical factors specified (use a value of 1 to specify no change) and the current MagModifier (if you do not specify to ignore the MagModifier). If the current MagModifier is ignored or 1.0 and the X and Y factors are specified as 1.0, the original calibration will be returned.
Note Note
This function can also be used to create calibrations that compensate for linear changes of the image size, e.g. due to resizing the image. Specify IgnoreMagModifer TRUE and pass in the ratio of the new size to the old size in the X and Y factors.
Examples
VB
' Create a derived calibration after resizing the image to 120% of its original size
Set origSCal = originalImage.SpatialCalib
Set newSCal = SpatialCalibs.AddDerived(origSCal, 1/1.2, 1/1.2, true)
newImage.SpatialCalib = newSCal
' Create a derived calibration for an image captured at 4x4 capture binning
' The MagModifier will automatically be applied.
Set newSCal = SpatialCalibs.AddDerived(SpatialCalibs.SystemCalib, 4, 4)
See Also