Click or drag to resize

IMcObjectOpBareAssign Method

Arithmetic binary operator to assign a VARIANT to this McObject, possibly reshaping it in the process, leaving the result in this McObject.

Namespace:  MediaCy.IQL.ObjectManager
Assembly:  MediaCy.IQL.ObjectManager (in MediaCy.IQL.ObjectManager.dll) Version: 10.0.6912.0
Syntax
VB
Function OpBareAssign ( 
	RightOperand As Object
) As McObject

Parameters

RightOperand
Type: SystemObject
Right operand. May be a scalar or array of any numeric type. It may also be an McObject instance of a numeric type.

Return Value

Type: McObject
Remarks
The VARIANT source operand is assigned to this McObject (using "bare" assignment reshaping rules) and the result is left in this McObject. This assignment is equivalent to an assignment to the SelectedValues property with all arguments missing. This type of assignment will cast the varRightOperand argument to this McObject's type if necessary and will, with some exceptions, adjust the shape of this McObject to match that of the source operand. This shape adjustment works only by changing the sizes of the elements of VAR'able dimensions. The number of dimensions and the size of any FIX'ed dimension(s) can only be changed in a Value property assignment or a Shape property assignment. An error results if this McObject's shape cannot be matched to that of the right because of a mismatch in the number of dimensions or because a FIX'ed dimension size would have to be changed. The full rules for "bare" assignment are: 1. If the left operand is a one-dimensional vector, then the right operand may be of arbitrary shape. That is, you are allowed to assign any object to a 1-D vector or array. If the left operand is a FIX'ed length array, the total size of all of the right operand's elements (as returned by the VectorLength() function) must be the same overall length as the left operand. 2. If the right operand is a one-dimensional vector or array, then the left operand can have any number of dimensions as long as it is of a "standard" shape. That is, you are allowed to assign a 1-D vector or array to any object for which all inner (right-most) dimensions of FIX'ed size. If the left operand's left-most dimension is also FIX'ed (i.e., is a FIX'ed length matrix), the total size of all its dimensions (the product of all dimension sizes) must be the same as the vector length of the right operand. 3. Otherwise, the right operand must have the same or one fewer dimensions than the left operand. If the number of dimensions is the same, then the sizes of VAR'iable dimensions in the left operand are adjusted to match corresponding dimensions on the right. Any FIX'ed size dimension in the left operand must be matched by a FIX'ed size dimension of the same size or a VAR'iable sized dimension where all instances are of the same size in the right operand. 4. If the number of dimensions of the right operand is one less than the number of those in the left , then the left-most dimension of the left operand is set to one (or zero if the left dimension of the right operand is empty), and then essentially the same rules as above apply to matching the remaining dimensions on the left with those on the right. In practice, these rules result in assignments that do pretty much what one would intuitively expect. For example, if you assign a 2-D object to a 2-D object, the result is just a copy, and if you assign a 1-D object to a 2-D object, the result is still a 2-D object, but it has only one "row". Some examples of
Examples
VB
' Get bounds of AOI sub-region 0 as a 2-D object, with right dimension fixed at 2
Dim dBoundsArray As McObject
Set dBoundsArray = GlobalTools.McArrayTemp("FLOAT",,2) 'create 2-D float array initially empty
Dim varBounds As Variant
ThisApplication.ActiveImage.Aoi.GetFeaturePoints 0, varBounds
'assign varBounds to dBoundsArray
dBoundsArray.OpBareAssign varBounds
MsgBox "Result has " + Str( dBoundsArray.Shape(mcobjSIC_SizeDim0) + " X,Y pairs of points."
See Also

Reference

IMcObjectOpBareAssign(Object)
McOpSmallerOf
McOpAndBits
McOpConcatConcat
McOpAND