CVB.Net 14.0
VinImage Class Reference

Image of a CVB Virtual Interface object. More...

Inherits DeviceImage.

Additional Inherited Members

- Public Member Functions inherited from Image
 Image (int width, int height)
 Creates an uninitialized image with the given width and height . More...
 
 Image (Size2D size)
 Creates an uninitialized image with the given size . More...
 
 Image (int width, int height, int numPlanes)
 Creates an uninitialized image with the given width and height , numPlanes infos. More...
 
 Image (Size2D size, int numPlanes)
 Creates an uninitialized image with the given size and numPlanes . More...
 
 Image (int width, int height, int numPlanes, PixelDataType dataType, int bitDepth)
 Creates an uninitialized image with the given width and height , numPlanes infos. More...
 
 Image (Size2D size, int numPlanes, PixelDataType dataType, int bitDepth)
 Creates an uninitialized image with the given size and numPlanes . More...
 
 Image (int width, int height, int numPlanes, DataType dataType)
 Creates an uninitialized image with the given width and height , numPlanes infos. More...
 
 Image (Size2D size, int numPlanes, DataType dataType)
 Creates an uninitialized image with the given size and numPlanes . More...
 
unsafe byte[] ToObjectBuffer ()
 Create a byte buffer with the serialized image object data. More...
 
override bool Equals (object obj)
 Equality check. More...
 
override int GetHashCode ()
 Build a suitable hash code. More...
 
double[] GetPixel (Point2D position)
 Gets the pixel values for all planes at the given position . More...
 
double[] GetPixel (int x, int y)
 Gets the pixel values for all planes at the given position. More...
 
bool Contains (Point2D pt)
 Tests if a pixel location is inside the image. More...
 
void Initialize (Area2D area, double value)
 Initialize the given area in all planes of this image to the specified value. More...
 
void Initialize (Rect area, double value)
 Initialize the given area in all planes of this image to the specified value. More...
 
void Initialize (Rect area, params double[] values)
 Initialize the given area in all planes of this image to the specified values. More...
 
void Initialize (Area2D area, params double[] values)
 Initialize the given area in all planes of this image to the specified values. More...
 
void Initialize (double value)
 Initialize all planes of this image to the specified value. More...
 
void Initialize (params double[] values)
 Initialize all planes of this image to the specified values. More...
 
virtual Image Clone ()
 Creates a new Image object that is a copy of the current instance. More...
 
virtual Image Copy ()
 Creates a new Image object that is a copy of the current instance. More...
 
void CopyTo (Image targetImage, Rect sourceRect, Point2D targetPosition)
 Copies the image data from the sourceRect of this image to the targetImage targetPosition . More...
 
void CopyTo (Image targetImage)
 Copies the image data from this image to the targetImage . More...
 
MappedImage Map (Rect rect)
 Creates a mapped image of the rect region of this image. More...
 
MappedImage Map (Rect sourceRect, Size2D targetSize)
 Creates a mapped image of the sourceRect region of this image scaled to the targetSize . More...
 
MappedImage Map (Size2D targetSize)
 Creates a mapped image of this whole image scaled to the targetSize . More...
 
Image SubImage (Rect sourceRect)
 Creates a new Image that is a copy from the given sourceRect of the image data of the current instance. More...
 
Image SubImage (Area2D sourceArea)
 Creates a new Image that is a copy from the given sourceArea of the image data of the current instance. More...
 
void Save (string fileName)
 Write the current content of the image into a file. The file format to be used is determined by the extension of the fileName . If a lossy format is selected, a default quality setting will be used (if you want to specify your own quality setting, please use the overload that allows specification of a quality value). More...
 
void Save (string fileName, double quality)
 Write the current content of the image into a file. The file format to be used is determined based on the fileName 's extension. The quality (and thereby size) of the resulting file can be adjusted using the quality parameter. When saving to a lossless file format, the quality parameter will be silently ignored. More...
 
void RaisePixelContentChanged ()
 Inform clients listening to the PixelContentChanged event that this image data has been completely updated (full area).
 
void RaisePixelContentChanged (Rect rect)
 Inform clients listening to the PixelContentChanged event that this image data has been updated in the given rect . More...
 
void BeginPixelContentChange ()
 Starts an image update block. More...
 
void EndPixelContentChange ()
 Ends an image update block. More...
 
IDisposable StartPixelContentChangeBlock ()
 Starts an image update block to be used in a using statement. More...
 
Point2Dd ImageToPixelCoordinates (Point2Dd p)
 Convert a pixel from image to pixel coordinates. More...
 
Area2D ImageToPixelCoordinates (Area2D area)
 Convert an Area2D from image to pixel coordinates. More...
 
Point2Dd PixelToImageCoordinates (Point2Dd p)
 Convert a pixel from pixel to image coordinates. More...
 
Area2D PixelToImageCoordinates (Area2D area)
 Convert an Area2D from pixel to image coordinates. More...
 
void Dispose ()
 IDisposable implementation. More...
 
void Close ()
 Alias of the Dispose() method. More...
 
- Static Public Member Functions inherited from Image
static Image FromHandle (IntPtr nativeHandle)
 Create a Image from a native handle. More...
 
static Image FromHandle (IntPtr nativeHandle, ShareObject doShare)
 Create a Image from a native handle and potentially increment the unmanaged reference count on the native handle. More...
 
static Image FromHandle (IntPtr nativeHandle, ShareObject doShare, UseMemoryPressure useMemoryPressure)
 Create a Image from a native handle and potentially increment the unmanaged reference count on the native handle. More...
 
static Image FromHandle (IntPtr nativeHandle, ShareObject doShare, long memoryPressure)
 Create a Image from a native handle and potentially increment the unmanaged reference count on the native handle. More...
 
static unsafe Image FromObjectBuffer (byte[] arr)
 Deserialize an image object from an object buffer generated by the extension method ToObjectBuffer. More...
 
static FileImage FromFile (string fileName)
 Loads an image with the given fileName . More...
 
static Image FromPlanes (MappingOption mapping, params ImagePlane[] planes)
 Create an image that is the result of concatenating a series of input planes . More...
 
static Image FromImages (MappingOption mapping, params Image[] images)
 Create an image that is the result of concatenating a series of input images. More...
 
- Protected Member Functions inherited from DeviceImage
 DeviceImage (Device device)
 Creates the VideoImage. More...
 
override void Dispose (bool disposing)
 Change the dispose handling by just detaching from the native handle. More...
 
- Protected Member Functions inherited from Image
 Image (IntPtr handle)
 Creates a Image object around a native handle. More...
 
 Image (IntPtr handle, ShareObject doShare, UseMemoryPressure useMemoryPressure)
 Creates a Image object around a native handle and guesses the memory pressure if useMemoryPressure indicates that. More...
 
 Image (IntPtr handle, ShareObject doShare, long memoryPressure)
 Creates a Image object around a native handle with the given memoryPressure . More...
 
void OnPixelContentChanged ()
 Inform clients listening to the PixelContentChanged event that this image data has been completely updated (full area).
 
virtual void OnPixelContentChanged (Rect rect)
 Inform clients listening to the PixelContentChanged event that this image data has been updated in the given rect . More...
 
virtual void Dispose (bool disposing)
 IDispose helper function. More...
 
void Detach ()
 Detaches this Image object from the native IMG. More...
 
- Properties inherited from DeviceImage
bool IsDisconnected [get, set]
 Gets whether this image is now standalone (not connected to a device anymore. More...
 
Device Parent [get]
 Gets the parent device of this image.
 
- Properties inherited from Image
bool IsDisposed [get]
 Tests if the native handle has already been disposed.
 
ImagePlaneCollection Planes [get]
 Access to the infos of the image. More...
 
Size2D Size [get]
 Size of the image. More...
 
int Width [get]
 Width of the image in pixels. More...
 
int Height [get]
 Height of the image in pixels. More...
 
bool HasOverlayMask [get]
 True if at least one of the image infos has the overlay mask bit set. More...
 
IntPtr Handle [get]
 Native CVB image handle. More...
 
ColorModel ColorModel [get]
 Color model that is realized by this image. More...
 
Rect Bounds [get]
 Retrieve the bounding rect of the Image. More...
 
AffineMatrix2D CoordinateSystem [get, set]
 Coordinate system of the image. 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 inherited from Image
EventHandler< RectEventArgsPixelContentChanged
 Fired when the image data of this image was consciously updated. More...
 
EventHandler HandleChanged
 Event that is fired when the handle of this image changed.
 
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

Image of a CVB Virtual Interface object.

This image points to the image data that is currently processed. It is not necessary the newest acquired image. It points to the image buffer that is returned due to the last grab synchronization method (i.e. IAcquisition.Wait() method).

Use this image only in the same thread context in which your grab handling occurs. The object will stay the same, but the underlying buffer changes when the synchronization method return successfully. If you need the image in a parallel context either copy the image (Image.Copy) or use the RingBufferImage in combination with LockMode.On. In the latter case you can unlock (dispose) the image when not needed anymore.