Base class of all stream related images. More...
Inherits Image.
Inherited by BufferImage, MultiPartImage, and RingBufferImage.
Protected Member Functions | |
StreamImage (IntPtr handle) | |
Creates the stream image and adopts its life-time. 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 | |
double | RawTimestamp [get, protected set] |
Gets the raw timestamp as reported by the driver. More... | |
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. | |
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... | |
MappedImage | Map (RotationMap rotation) |
Creates a mapped image of this whole image rotated by the given rotation . 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... | |
static Image | FromPixelFormat (Size2D size, PfncFormat pixelFormat) |
Create a Image from a pixel format. More... | |
static Image | FromPixelFormat (int width, int height, PfncFormat pixelFormat) |
Create a Image from a pixel format. More... | |
Events inherited from Image | |
EventHandler< RectEventArgs > | PixelContentChanged |
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... | |
Base class of all stream related images.
A stream related image is returned from a grab synchronization method like Stream.Wait(). These kinds of images normally use an underlying ring buffer or a queue to reuse memory and increase performance. This then implies, that the validity of this image's data is limited according to the used acquisition engine / strategy.
By default, you expect images of this type to be valid from creation until the next synchronization / acquisition start.
|
protected |
Creates the stream image and adopts its life-time.
handle | Image handle to adopt life-time |
|
getprotected set |
Gets the raw timestamp as reported by the driver.
This value's unit depends on the driver used. Examples:
GenICam.vin | Device ticks (GigE Vision/USB3 Vision). Can be translated via either the GevTimestampTickFrequency GenApi GenApi.IntegerNode or if that is not present the GenApi.IntegerNode.Increment of the TimestampLatchValue IntegerNode (granularity in nanoseconds). | Teledyne Dalsa Drivers | Dependent on configuration file. By default microseconds. | CVSisoMe.vin | Grabber FPGA frequency ticks (One tick would be 16 nanoseconds with the me4 and 8 nanoseconds with the me5). Can also be microseconds... | CVAVT1394.vin | Unit is seconds with 125 microsecond granularity (bus frequency). | Video/Emu | Unit is milliseconds; for variable rate videos the timestamp value is guessed by its frame number and the current frame time. |
---|
Keep in mind that the value might wrap around (can be as fast as 128s when the CVAVT1394.vin is used).
Value with undefined unit (dependent on driver); double.NaN if no timestamp is present at all.