CogImage8PixelMemory ClassCognex VisionPro 9.20
Virtual (noncreatable) class for accessing the interface that provides direct pointer access to 8-bit image pixels.
Inheritance Hierarchy

System Object
  System MarshalByRefObject
    Cognex.VisionPro.Implementation CogObjectBase
      Cognex.VisionPro.Implementation.Internal CogImage8PixelMemory

Namespace: Cognex.VisionPro.Implementation.Internal
Assembly: Cognex.VisionPro.Core (in Cognex.VisionPro.Core.dll) Version: 80.0.0.0
Syntax

public class CogImage8PixelMemory : CogObjectBase, 
	ICogNetInternal, IDisposable, ICogImage8PixelMemory

The CogImage8PixelMemory type exposes the following members.

Constructors

  NameDescription
Public methodCogImage8PixelMemory 
Constructs a new instance of this class.
Public methodCogImage8PixelMemory(IntPtr)
Constructs a new instance of this class using com pointer.
Top
Methods

  NameDescription
Protected methodattachCom
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 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 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 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.)
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)
Top
Fields

  NameDescription
Protected field__com
Protected field__disposed
Protected fieldStatic member__factory
Protected fieldStatic memberCreator
Top
Properties

  NameDescription
Public propertyHeight
Returns the height of the pixel data.
Public propertyScan0
Returns the address of the upper-left pixel.
Public propertyStride
Returns the offset in pixels from one row to the next. May be positive or negative.
Public propertyWidth
Returns the width of the pixel data.
Top
Remarks

Interface to an object that provides direct pointer access to 8-bit image pixel memory. Use Get8GreyPixelMemory(CogImageDataModeConstants, Int32, Int32, Int32, Int32) to get an CogImage8PixelMemory object.

CogImage8PixelMemory objects are intended for temporary use within functions that read or write pixel data. Caching an CogImage8PixelMemory object for long periods of time could lead to memory congestion. You must call Dispose  when you are finished using the object to release any resources that it uses. After you do so, any pointer that Scan0 returned becomes invalid.

If you request read/write or write-only access to the pixel memory when you call Get8GreyPixelMemory(CogImageDataModeConstants, Int32, Int32, Int32, Int32), the pixel memory may be copied internally. Any changes that you make to the pixel may not be written back to the image until you call Dispose . Your application should assume that no changes to the image take place until then.

See Also