CogPMAlignMulti ClassCognex VisionPro 9.8 SR1
The CogPMAlignMulti class.

This class is a collection of CogPMAlignPatternItem objects and holds the training parameters. This class provides a method to train this object and a method to execute the inspection.

The user can add patterns, access the patterns, and remove the patterns using the standard collection methods. For ease-of-use, adding and removing patterns will not un-train the tool; however, removing the last runnable pattern will un-train the tool.

Inheritance Hierarchy

System Object
  System MarshalByRefObject
    Cognex.VisionPro.Implementation CogObjectBase
      Cognex.VisionPro.Implementation CogSerializableObjectBase
        Cognex.VisionPro.Implementation CogSerializableChangedEventBase
          Cognex.VisionPro.Implementation CogSerializableCollectionBase CogPMAlignPatternItem 
            Cognex.VisionPro.PMAlign CogPMAlignMulti

Namespace: Cognex.VisionPro.PMAlign
Assembly: Cognex.VisionPro.PMAlign (in Cognex.VisionPro.PMAlign.dll) Version: 75.0.0.0
Syntax

[SerializableAttribute]
public class CogPMAlignMulti : CogSerializableCollectionBase<CogPMAlignPatternItem>, 
	IDeserializationCallback, IDisposable

The CogPMAlignMulti type exposes the following members.

Constructors

  NameDescription
Public methodCogPMAlignMulti 
Construct a default CogPMAlignMulti object.
Public methodCogPMAlignMulti(CogPMAlignMulti)
Construct a deep copy of the supplied CogPMAlignMultiPattern object.
Protected methodCogPMAlignMulti(SerializationInfo, StreamingContext)
Serialization constructor for CogPMAlignMutli object.
Top
Methods

  NameDescription
Public methodAdd
Adds value to the end of the collection.
(Inherited from CogSerializableCollectionBase T .)
Public methodAddAllItemsToSearchOrder
Internal Cognex use only. This is mainly used by the control. Add all runnable items to the queue. It does not throw
Public methodAddItemToSearchOrderByInternalID
Internal Cognex use only. This is mainly used by the control. The item is always added to the end of the queue. It does not throw
Public methodClear
Removes all objects from the collection.
(Inherited from CogSerializableCollectionBase T .)
Public methodContains
Returns true if value is in the collection
(Inherited from CogSerializableCollectionBase T .)
Public methodCopyTo
Copies the collection to an array
(Inherited from CogSerializableCollectionBase T .)
Public methodCreateObjRef
Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
(Inherited from MarshalByRefObject.)
Public methodDispose 
Protected methodDispose(Boolean)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodExecute
Execute this operator.
Protected methodFinalize (Overrides Object Finalize .)
Protected methodGetAttributes
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetClassName
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetComponentName
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetConverter
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetDefaultEvent
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetDefaultProperty
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetEditor
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetEvents 
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetEvents( Attribute )
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetLifetimeService
Retrieves the current lifetime service object that controls the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
Public methodGetNamesOfPatternsInQueue
Internal Cognex use only. This is mainly used by the control. The method returns the names of the patterns in the queue.
Protected methodGetObjectData
Serializer for CogPMAlignMultiPattern object.
(Overrides CogSerializableObjectBase GetObjectData(SerializationInfo, StreamingContext).)
Protected methodGetProperties 
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetProperties( Attribute )
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetPropertyOwner
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Public methodGetSearchOrderQueue
Returns the search order queue. The values in the array list are references to the CogPMAlignPatternItems held by the operator that are also in the queue.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetUniqueIDsOfPatternsInQueue
Internal Cognex use only. This is mainly used by the control. The method returns the internal unique id of the patterns in the queue.
Public methodIndexOf
Returns the index of value in the collection, or -1 if value is not in the collection.
(Inherited from CogSerializableCollectionBase T .)
Public methodInitializeLifetimeService
Obtains a lifetime service object to control the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
Public methodInsert
Inserts the value at the specified index of the collection
(Inherited from CogSerializableCollectionBase T .)
Protected methodMemberwiseClone 
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodMemberwiseClone(Boolean)
Creates a shallow copy of the current MarshalByRefObject object.
(Inherited from MarshalByRefObject.)
Public methodMove
Moves an item from one position to another.
(Inherited from CogSerializableCollectionBase T .)
Protected methodOnChanged(Int64)
This method should be called internally whenever the object's state may have changed.
(Inherited from CogSerializableChangedEventBase.)
Protected methodOnChanged(CogChangedEventArgs)
This method may be called internally whenever a derived object's state may have changed and the derived object expresses this change via a derived CogChangedEventArgs class.
(Inherited from CogSerializableChangedEventBase.)
Protected methodOnCleared
Raises the Cleared event.
(Inherited from CogSerializableCollectionBase T .)
Protected methodOnClearing
Raises the Clearing event.
(Inherited from CogSerializableCollectionBase T .)
Public methodOnDeserialization
Perform post-deserialization setup.
Protected methodOnInsertedItem
Raises the InsertedItem event.
(Inherited from CogSerializableCollectionBase T .)
Protected methodOnInsertingItem
Raises the InsertingItem event.
(Inherited from CogSerializableCollectionBase T .)
Protected methodOnMovedItem
Raises the MovedItem event.
(Inherited from CogSerializableCollectionBase T .)
Protected methodOnMovingItem
Raises the MovingItem event.
(Inherited from CogSerializableCollectionBase T .)
Protected methodOnRemovedItem
Raises the RemovedItem event.
(Inherited from CogSerializableCollectionBase T .)
Protected methodOnRemovingItem
Raises the RemovingItem event.
(Inherited from CogSerializableCollectionBase T .)
Protected methodOnReplacedItem
Raises the ReplacedItem event.
(Inherited from CogSerializableCollectionBase T .)
Protected methodOnReplacingItem
Raises the ReplacingItem event.
(Inherited from CogSerializableCollectionBase T .)
Public methodRemove
Removes value from the collection
(Inherited from CogSerializableCollectionBase T .)
Public methodRemoveAllItemsFromSearchOrder
Internal Cognex use only. This is mainly used by the control. All items are removed from the queue. It does not throw.
Public methodRemoveAt
Removes the element at the specified index.
(Inherited from CogSerializableCollectionBase T .)
Public methodRemoveItemFromSearchOrderByInternalID
Internal Cognex use only. This is mainly used by the control. The item is removed from the queue. It does not throw.
Public methodResetResultStatistics
Reset the result statistics window. Only affects SequentialMostSuccessful mode.
Public methodResumeAndRaiseChangedEvent
Re-enables raising of the Changed event after SuspendChangedEvent has been called, and raises the Changed event if the ChangedEventSuspended count is reduced to zero and any changes were made while events were suspended. Must be called once for each call to SuspendChangedEvent.
(Inherited from CogSerializableChangedEventBase.)
Public methodSetSearchOrderQueue
Sets the search order queue. Values must be references to held pattern items. Only referenced pattern items can be located at runtime. The queue is used in all modes. The queue will be updated in SequentialMostRecentlySuccessful and in SequentialMostSuccessful. Pattern items that are in the queue and are not runnable will cause a runtime error. Internally the queue is stored using the unique ids of the pattern items.
Public methodSuspendChangedEvent
Temporarily suspends the raising of the Changed event. May be called more than once, and a corresponding call to ResumeAndRaiseChangedEvent must be made for each call to SuspendChangedEvent.
(Inherited from CogSerializableChangedEventBase.)
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)
Public methodTrain
Train the multi-model. For multi-model training to be successful there must be at least one runnable pattern item in the collection.

A pattern item is runnable if the following 3 conditions are met:

  • It is trained
  • Has the same coarse and fine grain limits as the CogPMAlignMulti operator, and
  • Has the same train algorithm as the CogPMAlignMulti operator. At the start of the training, the trained state will be set to false.

The trained state will be set to true only if training is successful. The train method will throw an exception if training is unsuccessful.

Top
Fields

  NameDescription
Public fieldStatic memberSfGrainLimitCoarse
This bit will be set in the EventArgs of a Changed event every time the value returned by GrainLimitCoarse may have changed.
Public fieldStatic memberSfGrainLimitFine
This bit will be set in the EventArgs of a Changed event every time the value returned by GrainLimitFine may have changed.
Protected fieldStatic memberSfNextSf
Public fieldStatic memberSfResultStatisticWindowLength
This bit will be set in the EventArgs of a Changed event every time the value returned by ResultStatisticsWindowLength may have changed.
Public fieldStatic memberSfSelectedIndex
This bit will be set in the EventArgs of a Changed event every time the value returned by SelectedIndex may have changed.
Public fieldStatic memberSfSetSearchOrderQueue
This bit will be set in the EventArgs of a Changed event every time the value returned by SearchOrderQueue may have changed.
Public fieldStatic memberSfTrainAlgorithm
This bit will be set in the EventArgs of a Changed event every time the value returned by TrainAlgorithm may have changed.
Public fieldStatic memberSfTrained
This bit will be set in the EventArgs of a Changed event every time the value returned by Trained may have changed.
Top
Properties

  NameDescription
Public propertyChangedEventSuspended
If nonzero, indicates that the raising of the Changed event has been suspended. This value is incremented when SuspendChangedEvent is called and decremented when ResumeAndRaiseChangedEvent is called.
(Inherited from CogSerializableChangedEventBase.)
Public propertyCount
Gets the number of elements contained in the collection.
(Inherited from CogSerializableCollectionBase T .)
Public propertyGrainLimitCoarse
Gets or sets the coarse grain limit that must be used by all the patterns in the operator collection. The property is initialized when the first pattern is added to the operator. Valid range is 1 to 25.5. Setting the coarse less than fine will also set the fine to the new value.
Public propertyGrainLimitFine
Gets or sets the coarse grain limit that must be used by all the patterns in the operator collection. The property is initialized when the first pattern is added to the operator. Valid range is 1 to 25.5. Setting the coarse less than fine will also set the fine to the new value.
Public propertyHasChanged (Inherited from CogSerializableChangedEventBase.)
Protected propertyInnerList
Gets the internal List containing the list of elements.
(Inherited from CogSerializableCollectionBase T .)
Public propertyIsFixedSize
returns false
(Inherited from CogSerializableCollectionBase T .)
Public propertyIsReadOnly
Returns true if this collection is ReadOnly
(Inherited from CogSerializableCollectionBase T .)
Public propertyIsSynchronized (Inherited from CogSerializableCollectionBase T .)
Public propertyItem
Returns the T at index
(Inherited from CogSerializableCollectionBase T .)
Protected propertyList
Gets an the IList interface of this collection.
(Inherited from CogSerializableCollectionBase T .)
Public propertyResultStatisticWindowLength
Gets or sets the length of the window over which statistic data is collected. The data is used in SequentialMostSuccessful runtime mode to re-order the patterns in the queue. Calling the setter will cause any existing result statistics to be flushed.
Public propertySelectedIndex
Gets of sets the selected pattern. It is used by CreateCurrentRecord() to create the PatternTrainImage record. It is used by the edit control to specify the pattern selected in the grid.
Public propertyStateFlags
Returns the complete set of state flags supported on this object. The flags may be indexed by name as shown in the following C# code snippet: if (changedObject.StateFlags["Color"] & eventArgs.StateFlags) { ... }
(Inherited from CogSerializableChangedEventBase.)
Public propertySyncRoot (Inherited from CogSerializableCollectionBase T .)
Public propertyTrainAlgorithm
Gets or sets the train algorithm that must be used by all the patterns in the operator collection. The property is initialized when the first pattern is added to the operator.
Public propertyTrained
Returns true if the multi-model operator is trained. The property is set by the Train() method.
Top
Events

  NameDescription
Public eventChanged
This event is raised when one or more parts of the object's state may have changed.
(Inherited from CogSerializableChangedEventBase.)
Public eventCleared
Raised after the collection is cleared.
(Inherited from CogSerializableCollectionBase T .)
Public eventClearing
Raised before the collection is cleared.
(Inherited from CogSerializableCollectionBase T .)
Public eventInsertedItem
Raised after an item is inserted.
(Inherited from CogSerializableCollectionBase T .)
Public eventInsertingItem
Raised before an item is inserted.
(Inherited from CogSerializableCollectionBase T .)
Public eventMovedItem
Raised after an item is moved to a new index.
(Inherited from CogSerializableCollectionBase T .)
Public eventMovingItem
Raised before an item is moved to a new index.
(Inherited from CogSerializableCollectionBase T .)
Public eventMultiChanged
Internal Cognex use only.
Public eventRemovedItem
Raised after an item is removed.
(Inherited from CogSerializableCollectionBase T .)
Public eventRemovingItem
Raised before an item is removed.
(Inherited from CogSerializableCollectionBase T .)
Public eventReplacedItem
Raised after an item is replaced.
(Inherited from CogSerializableCollectionBase T .)
Public eventReplacingItem
Raised before an item is replaced.
(Inherited from CogSerializableCollectionBase T .)
Top
See Also