Description

This function warps the source image Aoi to a set of tiepoints in a new destination image.

Return Type

A McImage object.  

A new McImage

Syntax

object.ApplyToImage ([vSourceImg], [Flags])

The ApplyToImage Method syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type McWarp.
vSourceImgOptional. A Variant value.

Optional source image, operator applies to parent image when parameter is omitted.

FlagsOptional. A mcImageCreateFlags enumeration, as described in settings.

Optional image creation flags for the new image. By default the value is zero, which creates a visible image that is part of the Images collection. See mcImageCreateFlags for the list of supported flags.

Settings

The settings for Flags are:

ConstantValueDescription
 mcicfDefault0
 mcicfContiguous1

If set, frames are allocated contiguously, and you cannot add to the FrameCount at a later time.

 mcicfNoInit2

Default is to initialize to 0 (black), this flag suppresses initialization.

 mcicfNoAddToCollection4

If set, the image is created, but not added to the collection (see Notes).

 mcicfNotVisible8

If set, the image is created, possibly added to collection (see above), but not made visible.

 mcipfNoImportProperties8388608

Suppress ImportProperties for functions creating an image from another.

Remarks

The transformation is defined by the current value of the Clip, Method and Interpolation properties. It can handle rotation, translation, scaling, and skewing. If Method contains wmAffine, it is a first-order linear transformation, where a straight line in the source image will remain straight in the transformed image.

The transformation is calculated by putting in correspondence at least four points of the source image (specified in SourcePoints) with the corresponding points in the desired image (specified in DestPoints). If more than four points are supplied, the number supplied for DestPoints must equal the number supplied for SourcePoints; in this instance, a least-square interpolation will be used. The first tiepoint in DestPoints must correspond to the first tiepoint in SourcePoints, and all subsequent points must progress in the same direction. Note that points in SourcePoints do not necessarily point to pixels in the image. Similarly, the points in DestPoints do not necessarily point to pixels in the transformed image.