CogCaliperResults ClassCognex VisionPro
Collection of Caliper results.
Inheritance Hierarchy

System Object
  System MarshalByRefObject
    Cognex.VisionPro.Implementation CogObjectBase
      Cognex.VisionPro.Caliper CogCaliperResults

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

[SerializableAttribute]
public class CogCaliperResults : CogObjectBase, 
	ICogNetInternal, IDisposable, ICloneable, ISerializable, ICollection

The CogCaliperResults type exposes the following members.

Constructors

  NameDescription
Public methodCogCaliperResults 
Constructs a new instance of this class.
Public methodCogCaliperResults(IntPtr)
Constructs a new instance of this class using com pointer.
Public methodCogCaliperResults(CogCaliperResults)
Constructs a new instance of this class as a deep copy of the given instance.
Top
Methods

  NameDescription
Protected methodClone
Returns a deep copy of this class instance. Derived classes that implement Clone should override this method; other clients who wish to clone this instance should call ICloneable.Clone. See also CogSerializer.DeepCopyObject
Public methodCopyTo
Copies the contents of this collection to an array.
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.)
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 methodGetFilteredValues
Filtered image values normalized to the range -255 -> 255. These values represent the contrast at each point in the projected image.
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
Public methodGetProjectionValues
Projected image values. These are normalized to the range 0 -> 255 and account for any clipping.
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 methodGetTime
Elapsed time in milliseconds for the specified time component.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodIndexOf
Gets the index of the given item. If the item cannot be found -1 is returned.
Public methodInitializeLifetimeService
Obtains a lifetime service object to control the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
Public methodMap
Map between filtered image location and result position and projection image location.
Public methodMapFromImage
Map from the image to one of the caliper 1D spaces.
Public methodMapToImage
Map from a caliper 1D space back to the image. T parameterizes the direction of projection such that a value of 0 corresponds to the P0PX edge of the caliper window and a value of 1 corresponds to the opposite edge.
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 methodSort
Sort the results and create a new results object.
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)
Top
Properties

  NameDescription
Public propertyCount
Gets the number of items contained in this collection.
Public propertyEdges
Collection of all edges located, in increasing order of position.
Public propertyIsSynchronized
Gets a value indicating whether access to this collection is synchronized (thread-safe).
Public propertyItem
Gets or sets the item at the specified index. In C#, this property is the indexer for the collection.
Public propertySyncRoot
Gets an object that can be used to synchronize access to this collection.
Top
Remarks

Collection of caliper results.

Examples

Imports Cognex.VisionPro
      Imports Cognex.VisionPro.Caliper
      Imports Cognex.VisionPro.ImageProcessing

      ' Working with a CogCaliperTool object
      Dim myCaltool As New CogCaliperTool

      ' Display a point marker for each found edge
      Dim myEdge As CogCaliperEdge

      For Each myEdge In myCaltool.Results.Edges
  Dim myCPM As New CogPointMarker
        myCPM.SetCenterRotationSize(myEdge.PositionX, myEdge.PositionY, 0, 10)

        If myEdge.Contrast > 10 Then
          myCPM.Color = CogColorConstants.DarkGreen
        Else
          myCPM.Color = CogColorConstants.Red
        End If

        CogDisplay1.StaticGraphics.Add(myCPM, "")
      Next
using Cognex.VisionPro;
using Cognex.VisionPro.Caliper;
using Cognex.VisionPro.ImageProcessing;

// Working with a CogCaliperTool object
CogCaliperTool myCaltool = new CogCaliperTool();

// Display a point marker for each found edge 
foreach (CogCaliperEdge myEdge in myCaltool.Results.Edges)
{
  CogPointMarker myCPM = new CogPointMarker();
  myCPM.SetCenterRotationSize(myEdge.PositionX, myEdge.PositionY, 0, 10);

  if ( myEdge.Contrast > 10 )
{
    myCPM.Color = CogColorConstants.DarkGreen;
}
  else
{
    myCPM.Color = CogColorConstants.Red;
}
  CogDisplay1.StaticGraphics.Add(myCPM, "");
}
See Also