CVB.Net 14.0
Plane Class Reference

A single linear plane of component data. More...

Inherits INativeHandle.

Public Member Functions

void Dispose ()
 IDisposable implementation. More...
 
IntPtr GetIncrement (int dimension)
 Gets the number of elements at the given dimension . More...
 
long GetLength (int dimension)
 Gets the number of elements at the given dimension . More...
 

Static Public Member Functions

static Plane FromHandle (IntPtr handle, ShareObject doShare)
 Create a plane object from a handle . More...
 
static Plane FromImagePlane (ImagePlane imagePlane, PlaneRole role)
 Creates a plane from an image plane. More...
 

Protected Member Functions

 Plane (IntPtr handle)
 Create a plane object from a handle . More...
 
 Plane (IntPtr handle, IntPtr sharedImagePlaneHandle)
 Constructor. More...
 
virtual void Dispose (bool disposing)
 IDispose helper function. More...
 

Properties

IntPtr Handle [get]
 Native CVB buffer handle. More...
 
bool IsDisposed [get]
 Tests if the native handle has already been disposed.
 
PlaneRole Role [get]
 Gets the PlaneRole of this plane.
 
DataType DataType [get]
 Gets the CVB DataType for this plane.
 
IntPtr BasePtr [get]
 Get the base address of the plane's memory.
 
int Rank [get]
 Get the rank of the plane. More...
 
- Properties inherited from INativeHandle
IntPtr Handle [get]
 The native handle of the object.
 
bool IsDisposed [get]
 Possibility to check whether the object has already been disposed of.
 

Events

NativeHandleEventDelegate ObjectDisposing
 Raised when this object is about to be disposed via the IDisposable.Dispose method. More...
 
- Events inherited from INativeHandle
NativeHandleEventDelegate ObjectDisposing
 Raised when this object is about to be disposed via the IDisposable.Dispose method.
More...
 

Detailed Description

A single linear plane of component data.

Constructor & Destructor Documentation

◆ Plane() [1/2]

Plane ( IntPtr  handle)
protected

Create a plane object from a handle .

Parameters
handleNative IBuffer handle.

◆ Plane() [2/2]

Plane ( IntPtr  handle,
IntPtr  sharedImagePlaneHandle 
)
protected

Constructor.

Parameters
handleNative IBuffer handle.
sharedImagePlaneHandleNative handle of the ImagePlane the handle was created with.

Member Function Documentation

◆ Dispose() [1/2]

void Dispose ( )

IDisposable implementation.

Call this method to release the resources allocated by this buffer immediately. Remember that after calling Dispose, any subsequent access to references to this buffer will result in an ObjectDisposedException.

◆ Dispose() [2/2]

virtual void Dispose ( bool  disposing)
protectedvirtual

IDispose helper function.

Parameters
disposingtrue when called via IDisposable.Dispose, false when called by the finalizer.

◆ FromHandle()

static Plane FromHandle ( IntPtr  handle,
ShareObject  doShare 
)
static

Create a plane object from a handle .

Parameters
handleNative IBuffer handle.
doShareShareObject.Yes if handle should be shared.
Returns
Newly created wrapper object.

◆ FromImagePlane()

static Plane FromImagePlane ( ImagePlane  imagePlane,
PlaneRole  role 
)
static

Creates a plane from an image plane.

Parameters
imagePlaneThe image plane.
roleThe role of this plane.
Returns
The created plane.
Exceptions
ArgumentExceptionWhen imagePlane does not support linear access.
CvbExceptionWhen an error during plane creation occurs.

◆ GetIncrement()

IntPtr GetIncrement ( int  dimension)

Gets the number of elements at the given dimension .

Parameters
dimensionDimension to get length for; e.g. 0 for x-values.
Returns
The number of elements in the given dimension .

◆ GetLength()

long GetLength ( int  dimension)

Gets the number of elements at the given dimension .

Parameters
dimensionDimension to get length for; e.g. 0 for x-values.
Returns
The number of elements in the given dimension .

Property Documentation

◆ Handle

IntPtr Handle
get

Native CVB buffer handle.

It is normally not necessary to work with this handle in CVB.Net. Note that using this handle in connection with the legacy CVB managed wrappers may actually be disruptive to your application.

Implements INativeHandle.

◆ Rank

int Rank
get

Get the rank of the plane.

The rank is the number of dimensions in the plane. E.g. 2 for an image.

Event Documentation

◆ ObjectDisposing

NativeHandleEventDelegate ObjectDisposing

Raised when this object is about to be disposed via the IDisposable.Dispose method.

This event is raised right before this object is disposed. The dispose itself cannot be canceled.