Cog3DPatMaxPattern ClassCognex VisionPro 9.23
Class that represents a 3DPatMax pattern. You can use the methods of this class to train a new pattern and to search for instances of the trained pattern in 3D runtime data. You can also search for pattern instances using the tool class: Cog3DPatMaxTool.
Inheritance Hierarchy

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

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

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

The Cog3DPatMaxPattern type exposes the following members.

Constructors

  NameDescription
Public methodCog3DPatMaxPattern 
Constructs a default Cog3DPatMaxPattern object. You must train this object before you can use it to search for pattern instances.
Public methodCog3DPatMaxPattern(Cog3DPatMaxPattern)
Constructs a deep copy of the supplied Cog3DPatMaxPattern object.
Protected methodCog3DPatMaxPattern(SerializationInfo, StreamingContext)
Serialization constructor for Cog3DPatMaxPattern 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 Cog3DPatMaxPattern 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 Cog3DPatMaxPattern 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 vision data 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 3DPatMax pattern. If the pattern is already trained then it is untrained and retrained.
Public methodUntrain
Untrains this 3DPatMax 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.
Public fieldStatic memberSfGranularity
This bit will be set in the EventArgs of a Changed event every time the value returned by Granularity may have changed.
Public fieldStatic memberSfGranularityAutoSelect
This bit will be set in the EventArgs of a Changed event every time the value returned by GranularityAutoSelect may have changed.
Public fieldStatic memberSfGranularityFineFraction
This bit will be set in the EventArgs of a Changed event every time the value returned by GranularityFineFraction 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 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 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 propertyGranularity
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 GranularityAutoSelect is "true" this size value is recomputed automatically when the pattern is trained, overwriting the previous value.
Public propertyGranularityAutoSelect
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 Granularity. Otherwise, it remains unchanged.
Public propertyGranularityFineFraction
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 Granularity specifies the length of one side of the fine subsampling cube.
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 data. In other words, it defines the origin of the pattern's coordinate space relative to the 3D selected space of the train data.
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 propertyTrained
Gets whether this pattern is currently trained.
Public propertyTrainRegion
Gets or sets the train region. Only the portion of the 3D train data that lies within this region is trained by 3DPatMax. If the supplied region object is null, all of the 3D data is trained.
Public propertyTrainTimeout
Gets or sets the maximum execution time (in msec) allowed when a 3DPatMax 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 data used to train this 3DPatMax 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 3DPatMax 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 vision data. You can do this in one of two ways:

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

See Also