Cog3DAlignPattern ClassCognex VisionPro
Class that represents a 3DAlign pattern. You can use the methods of this class to train a new pattern and to search for instances of the trained pattern in a 3D runtime image. You can also search for pattern instances using the tool class: Cog3DAlignTool.
Inheritance Hierarchy

System Object
  System MarshalByRefObject
    Cognex.VisionPro.Implementation CogObjectBase
      Cognex.VisionPro.Implementation CogSerializableObjectBase
        Cognex.VisionPro.Implementation CogSerializableChangedEventBase
          Cognex.VisionPro3D Cog3DAlignPattern

Namespace: Cognex.VisionPro3D
Assembly: Cognex.VisionPro3D (in Cognex.VisionPro3D.dll) Version: 65.1.0.0
Syntax

[SerializableAttribute]
public class Cog3DAlignPattern : CogSerializableChangedEventBase, 
	IDeserializationCallback, IDisposable

The Cog3DAlignPattern type exposes the following members.

Constructors

  NameDescription
Public methodCog3DAlignPattern 
Constructs a default Cog3DAlignPattern object. You must train this object before you can use it to search for pattern instances.
Public methodCog3DAlignPattern(Cog3DAlignPattern)
Constructs a deep copy of the supplied Cog3DAlignPattern object.
Protected methodCog3DAlignPattern(SerializationInfo, StreamingContext)
Serialization constructor for Cog3DAlignPattern object.
Top
Methods

  NameDescription
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 
Releases all resources used by this Cog3DAlignPattern object.
Protected methodDispose(Boolean)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodExecute
Searchs the given inputVisionData for instances of this pattern. The search is performed using the supplied runParams within the given region.
Protected methodFinalize
Releases all unmanaged resources used by this Cog3DAlignPattern object.
(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.)
Protected methodGetObjectData
Populates the provided SerializationInfo with the data needed to serialize the 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 methodGetTrainedBoundingBox
Gets the bounding box of the trained points for this pattern.
Public methodGetTrainedVisionData
Gets a range image representation of the trained points for this pattern.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodInitializeLifetimeService
Obtains a lifetime service object to control the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
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.)
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.)
Public methodOnDeserialization
Perform final deserialization setup.
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 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
Trains this 3DAlign pattern. If the pattern is already trained then it is untrained and retrained.
Public methodUntrain
Untrains this 3DAlign pattern.
Top
Fields

  NameDescription
Public fieldStatic memberSfGetTrainedBoundingBox
This bit will be set in the EventArgs of a Changed event every time the value returned by GetTrainedBoundingBox  may have changed.
Public fieldStatic memberSfGetTrainedVisionData
This bit will be set in the EventArgs of a Changed event every time the value returned by GetTrainedVisionData  may have changed.
Protected fieldStatic memberSfNextSf
Public fieldStatic memberSfOrigin
This bit will be set in the EventArgs of a Changed event every time the value returned by Origin may have changed.
Public fieldStatic memberSfSubsamplingCubeSize
This bit will be set in the EventArgs of a Changed event every time the value returned by SubsamplingCubeSize may have changed.
Public fieldStatic memberSfSubsamplingCubeSizeAutoSelect
This bit will be set in the EventArgs of a Changed event every time the value returned by SubsamplingCubeSizeAutoSelect may have changed.
Public fieldStatic memberSfSubsamplingCubeSizeFineFraction
This bit will be set in the EventArgs of a Changed event every time the value returned by SubsamplingCubeSizeFineFraction 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.
Public fieldStatic memberSfTrainedAlgorithm
This bit will be set in the EventArgs of a Changed event every time the value returned by TrainedAlgorithm may have changed.
Public fieldStatic memberSfTrainRegion
This bit will be set in the EventArgs of a Changed event every time the value returned by TrainRegion may have changed.
Public fieldStatic memberSfTrainTimeout
This bit will be set in the EventArgs of a Changed event every time the value returned by TrainTimeout may have changed.
Public fieldStatic memberSfTrainTimeoutEnabled
This bit will be set in the EventArgs of a Changed event every time the value returned by TrainTimeoutEnabled may have changed.
Public fieldStatic memberSfTrainVisionData
This bit will be set in the EventArgs of a Changed event every time the value returned by TrainVisionData 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 propertyHasChanged (Inherited from CogSerializableChangedEventBase.)
Public propertyOrigin
Gets or sets the origin for the pattern. This 3D rigid transform maps points from "Pattern Space" to the 3D selected space of the train image. In other words, it defines the origin of the pattern's coordinate space relative to the 3D selected space of the train image.
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 propertySubsamplingCubeSize
Gets or sets the size of the subsampling cube to use during training and runtime. This value is the length of one side of the cube. If SubsamplingCubeSizeAutoSelect is "true" this size value is recomputed automatically when the pattern is trained, overwriting the previous value.
Public propertySubsamplingCubeSizeAutoSelect
Gets or sets whether to automatically recompute the size of the subsampling cube during pattern training. If "true", the size computed during training overwrites the existing SubsamplingCubeSize. Otherwise, it remains unchanged.
Public propertySubsamplingCubeSizeFineFraction
Gets or sets the fraction for determining the fine subsampling cube size to use during training and runtime. This fraction must be greater than zero and less than or equal to one. The product of this fraction and SubsamplingCubeSize specifies the length of one side of the fine subsampling cube.
Public propertyTrainAlgorithm
Gets or sets the 3DAlign algorithm to train. The trained algorithm is used at runtime.
Public propertyTrained
Gets whether this pattern is currently trained.
Public propertyTrainedAlgorithm
Gets the 3DAlign algorithm that was trained.
Public propertyTrainRegion
Gets or sets the train region. Only the portion of the 3D train image that lies within this region is trained by 3DAlign. If the supplied region object is null, the entire 3D image is trained.
Public propertyTrainTimeout
Gets or sets the maximum execution time (in msec) allowed when a 3DAlign pattern is trained. This value only applies if TrainTimeoutEnabled is set to "true".
Public propertyTrainTimeoutEnabled
Gets or sets whether to enable the train timeout.
Public propertyTrainVisionData
Gets or sets the 3D image data used to train this 3DAlign pattern. Only the portions of the 3D data that lie within the TrainRegion are trained.
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.)
Top
Remarks

A 3DAlign pattern must be trained (using the Train  method) before it can be used to search for pattern instances. The trained pattern holds information needed for fast searching at runtime.

The pattern object also holds parameters that control the training process. If you change any of these parameters on a trained pattern object, the pattern automatically untrains itself. This ensures that the trained pattern data is in sync with the parameters that created it.

The only properties that do not untrain the pattern when changed are:

Once your pattern is trained you can search for instances of the pattern in a runtime input image. You can do this in one of two ways:

  1. You can call the Execute(ICogVisionData, ICog3DShape, Cog3DAlignRunParams) method of this class, or
  2. You can call the Run  method of a Cog3DAlignTool class that contains this pattern object.

See Also