CogImage16Range ClassCognex VisionPro 9.5
Object that describes a range image. A range image describes three dimensional surfaces. A CogImage16Range contains three dimensional height data, a "visible pixel mask" to identify which pixels are valid, three dimensional transform information, and two dimensional transform information.
Inheritance Hierarchy

System Object
  System MarshalByRefObject
    Cognex.VisionPro.Implementation CogObjectBase
      Cognex.VisionPro.Implementation CogSerializableObjectBase
        Cognex.VisionPro.Implementation CogSerializableChangedEventBase
          Cognex.VisionPro CogImage16Range

Namespace: Cognex.VisionPro
Assembly: Cognex.VisionPro.CorePlus (in Cognex.VisionPro.CorePlus.dll) Version: 69.0.0.0
Syntax

[SerializableAttribute]
public class CogImage16Range : CogSerializableChangedEventBase, 
	ICogImage, ICogVisionData, ICogImage, ICogVisionData, ICogImage16RangeLegacy, 
	ICloneable, IDisposable

The CogImage16Range type exposes the following members.

Constructors

  NameDescription
Public methodCogImage16Range 
Construct a new instance of this class.
Public methodCogImage16Range(Bitmap)
Construct a new instance of this class using the supplied bitmap to specify pixel data. Note that this produces an image with an assumed identity mapping from "Sensor3D" space to root space.
Public methodCogImage16Range(CogImage16Range)
Construct a new instance of this class as a shallow copy of the given instance.
Public methodCogImage16Range(ICog3DTransform)
Construct a new instance of this class using the supplied RootFromSensor3D transform.
Protected methodCogImage16Range(SerializationInfo, StreamingContext)
Serialization constructor for CogImage16Range object.
Public methodCogImage16Range(Int32, Int32, ICog3DTransform)
Construct a new instance of this class using the supplied RootFromSensor3D transform and allocating storage for the specified image size.
Public methodCogImage16Range(CogImage16Grey, CogImage8Grey, ICog3DTransform)
Construct a new instance of this class using the supplied pixel data, mask data, and RootFromSensor3D transform.
Public methodCogImage16Range(CogImage16Grey, Int32, ICog3DTransform)
Construct a new instance of this class using the supplied pixel data, missing pixel value, and RootFromSensor3D transform. Mask data is automatically computed by identifying any pixel in the PixelData argument whose value matches the MissingPixelValue as not visible while all other pixels are set to visible. If no missing pixels are found then the mask root is set to null.
Top
Methods

  NameDescription
Public methodAllocate
Initialize the image with (undefined) pixel and mask data of the given width and height. This method may not be called more than once.
Public methodClone
Return a deep copy of this CogImage16Range.
Public methodCopy 
Create a copy of this image. Pixel and mask data are copied.
Public methodCopy(CogImageCopyModeConstants)
Create a copy of this image. Pixel and mask data may be shared between images by specifying CopyMode to be CogImageCopyModeConstants.SharePixels.
Public methodCopyBase
Create a copy of this image. Pixel and mask data may be shared between images by specifying CopyMode to be CogImageCopyModeConstants.SharePixels.
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 
Destruct this CogImage16Range.
Protected methodDispose(Boolean)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Finalize this CogImage16Range.
(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 methodGetInternalData
For Cognex internal use only.
Public methodGetIsImageZAlignedSpace
Determine if the specified 3D space's Z axis is aligned with (parallel to) the image Z axis within 0.0000001 degrees. Return true if it is, return false otherwise.
Public methodGetLifetimeService
Retrieves the current lifetime service object that controls the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
Public methodGetMaskData
Returns a CogImage8Grey that represents the mask data of this image. This data is commonly referred to as the "visible pixel mask" and is provided as an indication of which pixel values were visible to the camera during acquisition. Any range image pixel that was not visible has an undefined pixel value. The visible pixel mask represents a visible pixel at a given row and column with an 8 bit grey value of 255, and a non-visible pixel with an 8 bit grey value of zero. The CogImage8Root and the two dimensional coordinate space tree of this CogImage8Grey visible pixel mask representation are shared with this range image. Note that the value returned by this method may be null, in which case all pixel values are considered visible.
Protected methodGetObjectData
Populates the provided SerializationInfo with the data needed to serialize the object.
(Overrides CogSerializableObjectBase GetObjectData(SerializationInfo, StreamingContext).)
Public methodGetPixel
Gets the mask (visible) and pixel value at the specified pixel space coordinates.
Public methodGetPixelData
Returns a CogImage16Grey that represents the range or height data of this image. The root and two dimensional coordinate space tree are shared with this range image.
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 methodGetRoot
Returns the range image root object that contains the underlying pixel and mask roots.
Public methodGetTransform
Returns a transform that maps two dimensional points from the 'From' space to the 'To' space. The special string "." is accepted as an alias for the SelectedSpaceName of this image.
Public methodGetTransform3D
Returns a transform that maps three dimensional points from the 'From' space to the 'To' space. The special string "." is accepted as an alias for the SelectedSpaceName3D of this image.
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.)
Public methodMapPoint2DFrom3D
Maps the supplied three dimensional point into the specified two dimensional space. This is accomplished by first mapping the input three dimensional point to root space. The X and Y coodinates of this root space point are then mapped to the specified two dimensional space to produce the output two dimensional point.
Public methodMapPoint3DFrom2D
Maps the supplied two dimensional point into the specified three dimensional space. This is accomplished by first mapping the input two dimensional point to pixel space. If the range image's visible pixel mask indicates that this pixel was not visible, then the Visible output argument is set to false and no further processing is performed. Otherwise, the pixel value is read. This range image pixel value is incremented by 0.5 to place it at a "middle" height within the subject voxel. The resulting pixel space coordinate triple is mapped into the requested three dimensional space.
Public methodMapPoints2DFrom3D
Maps the supplied collection of three dimensional points into the specified two dimensional space. This is accomplished by first mapping an input three dimensional point to root space. The X and Y coodinates of this root space point are then mapped to the specified two dimensional space to produce that output two dimensional point.
Public methodMapPoints3DFrom2D
Maps the supplied collection of two dimensional points into the specified three dimensional space. This is accomplished by first mapping an input two dimensional point into pixel space. If the range image's visible pixel mask indicates that this pixel was not visible, then the corresponding element in the output Visible array is set to false and the corresponding element in the output DstPoints3D collection is set to a default (0,0,0) value. Otherwise, the pixel value is read. This range image pixel value is incremented by 0.5 to place it at a "middle" height within the subject voxel. The resulting pixel space coordinate triple is mapped into the requested three dimensional space.
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 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 methodScaleImage
Creates a scaled version of this image. The dimensions of the returned image (in pixels) are specified by the DesiredWidth and DesiredHeight arguments. The scaling is performed using bilinear interpolation.
Public methodSetInternalData
For Cognex internal use only.
Public methodSetPixel
Set the pixel and mask values at a given pixel space location. Note that setting VisibleValue to false on a CogImage16Range whose root currently has a null mask root will cause an appropriately sized and populated mask root to be created. The opposite is not true: setting the sole non-visible mask value to visible will not cause the mask root to be set to null.
Public methodSetRoot
Sets the range image root.
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 methodToBitmap
Creates a 24-bit RGB Windows bitmap from this image.
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)
Top
Fields

  NameDescription
Public fieldStatic memberSfCoordinateSpaceTree
This bit will be set in the EventArgs of a Changed event every time the value returned by CoordinateSpaceTree may have changed.
Public fieldStatic memberSfCoordinateSpaceTree3D
This bit will be set in the EventArgs of a Changed event every time the value returned by CoordinateSpaceTree3D may have changed.
Protected fieldStatic memberSfNextSf
Public fieldStatic memberSfPixelFromRootTransform
This bit will be set in the EventArgs of a Changed event every time the value returned by PixelFromRootTransform may have changed.
Public fieldStatic memberSfPixelFromRootTransform3D
This bit will be set in the EventArgs of a Changed event every time the value returned by PixelFromRootTransform3D may have changed.
Public fieldStatic memberSfSelectedSpaceName
This bit will be set in the EventArgs of a Changed event every time the value returned by SelectedSpaceName may have changed.
Public fieldStatic memberSfSelectedSpaceName3D
This bit will be set in the EventArgs of a Changed event every time the value returned by SelectedSpaceName3D may have changed.
Top
Properties

  NameDescription
Public propertyAllocated
Whether there is pixel data associated with this image.
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 propertyCoordinateSpaceTree
Get or set the tree of all named two dimensional coordinate spaces for this image. The tree provides advanced functions for managing two dimensional coordinate spaces.
Public propertyCoordinateSpaceTree3D
Get or set the tree of all named three dimensional coordinate spaces for this image. The tree provides advanced functions for managing three dimensional coordinate spaces.
Public propertyHasChanged (Inherited from CogSerializableChangedEventBase.)
Public propertyHeight
The number of rows of pixels in this image.
Public propertyPixelFromRootTransform
Gets a copy of the transform that maps from pixel space ("#") to two dimensional root space ("@"). Due to the unique nature of the CogImage16Range, setting PixelFromRootTransform is not allowed. Attempts to set PixelFromRootTransform will cause an InvalidOperationException to be thrown.
Public propertyPixelFromRootTransform3D
Get or set the transform that maps from three dimensional root space to pixel space.
Public propertySelectedSpaceName
Get or set the name of the two dimensional coordinate space to be used by tools that process this image.
Public propertySelectedSpaceName3D
Gets or sets the name of the three dimensional coordinate space to be used by tools which process this 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 propertyWidth
The number of columns of pixels in this image.
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
See Also