Async wrapper methods for IAcquisition objects. More...
Static Public Member Functions | |
static Task< StreamImage > | GetSnapshotAsync (this IAcquisition acq) |
Acquires a single image and returns it. More... | |
static Task< StreamImage > | GetTimedSnapshotAsync (this IAcquisition acq, UsTimeSpan timeSpan) |
Acquires a single image and returns it. More... | |
static Task< StreamImage > | WaitAsync (this IAcquisition acq) |
Waits infinitely for the next acquired image and returns it. More... | |
static Task< MultiPartImage > | WaitAsync (this ImageStream stream) |
Waits infinitely for the next acquired image and returns it. More... | |
static Task< MultiPartImage > | WaitAsync (this ImageStream stream, CancellationToken cancellationToken) |
Waits for the next acquired image and returns it, abortable by the cancellation token. More... | |
static Task< PointCloud > | WaitAsync (this PointCloudStream stream) |
Waits infinitely for the next acquired point cloud and returns it. More... | |
static Task< PointCloud > | WaitAsync (this PointCloudStream stream, CancellationToken cancellationToken) |
Waits for the next acquired point cloud and returns it, abortable by the cancellation token. More... | |
static Task< Composite > | WaitAsync (this CompositeStream stream) |
Waits infinitely for the next acquired composite and returns it. More... | |
static Task< Composite > | WaitAsync (this CompositeStream stream, CancellationToken cancellationToken) |
Waits for the next acquired composite and returns it, abortable by the cancellation token. More... | |
static Task< StreamImage > | WaitForAsync (this IAcquisition acq, UsTimeSpan timeSpan) |
Waits for the given timeSpan for the next acquired image. More... | |
static Task< MultiPartImage > | WaitForAsync (this ImageStream stream, UsTimeSpan timeout) |
Waits for the given timeout for the next acquired image. More... | |
static Task< MultiPartImage > | WaitForAsync (this ImageStream stream, UsTimeSpan timeout, CancellationToken cancellationToken) |
Waits for the given timeout for the next acquired image. More... | |
static Task< PointCloud > | WaitForAsync (this PointCloudStream stream, UsTimeSpan timeout) |
Waits for the given timeout for the next acquired point cloud. More... | |
static Task< PointCloud > | WaitForAsync (this PointCloudStream stream, UsTimeSpan timeout, CancellationToken cancellationToken) |
Waits for the given timeout for the next acquired point cloud. More... | |
static Task< Composite > | WaitForAsync (this CompositeStream stream, UsTimeSpan timeout) |
Waits for the given timeout for the next acquired composite. More... | |
static Task< Composite > | WaitForAsync (this CompositeStream stream, UsTimeSpan timeout, CancellationToken cancellationToken) |
Waits for the given timeout for the next acquired composite. More... | |
Async wrapper methods for IAcquisition objects.
|
static |
Acquires a single image and returns it.
The task waits infinitely for the image to be taken.
Attention:
it is generally not possible to call this method while the acquisition has been started by IAcquisition.Start.
Dispose the returned Image when not needed anymore!
By default the returned image content is only guaranteed to stay unchanged until the next call to this method; afterwards the returned image is normally disposed. Thus it is normally not save to use this image in a display.
This method uses an asynchronous wrapper to make asynchronous handling easier with the CVB acquisition engine. As a side effect using this interface is not as efficient as calling IAcquisition.GetSnapshot directly.
acq | Stream to work on. |
|
static |
Acquires a single image and returns it.
Waits for the given timeSpan for the image to be taken.
Attention:
it is generally not possible to call this method while the acquisition has been started by IAcquisition.Start.
Dispose the returned Image when not needed anymore!
By default the returned image content is only guaranteed to stay unchanged until the next call to this method; afterwards the returned image is normally disposed. Thus it is normally not save to use this image in a display.
This method uses an asynchronous wrapper to make asynchronous handling easier with the CVB acquisition engine. As a side effect using this interface is not as efficient as calling IAcquisition.GetTimedSnapshot(UsTimeSpan) directly.
acq | Stream to work on. |
timeSpan | Time span to wait for (millisecond granularity). |
|
static |
Waits infinitely for the next acquired composite and returns it.
Dispose the returned Composite when not needed anymore!
The returned composite is not necessary the newest. If more point clouds where acquired since the last call to this method, the content is the oldest not collected composite buffer by default.
This method uses an asynchronous wrapper to make asynchronous handling easier with the CVB acquisition engine. As a side effect using this interface is not as efficient as calling CompositeStream.Wait() directly.
stream | Stream to work on. |
|
static |
Waits for the next acquired composite and returns it, abortable by the cancellation token.
Dispose the returned Composite when not needed anymore!
The returned composite is not necessary the newest. If more point clouds where acquired since the last call to this method, the content is the oldest not collected composite buffer by default.
This method uses an asynchronous wrapper to make asynchronous handling easier with the CVB acquisition engine. As a side effect using this interface is not as efficient as calling CompositeStream.Wait() directly.
stream | Stream to work on. |
cancellationToken | Token to cancel the wait. |
|
static |
Waits infinitely for the next acquired image and returns it.
Dispose the returned Image when not needed anymore!
By default the returned image content is only guaranteed to stay unchanged until the next call to this method; afterwards the returned image is normally disposed. Thus it is normally not save to use this image in a display.
The returned image is not necessary the newest. If more images where acquired since the last call to this method, the content is the oldest not collected image buffer by default.
This method uses an asynchronous wrapper to make asynchronous handling easier with the CVB acquisition engine. As a side effect using this interface is not as efficient as calling IAcquisition.Wait() directly.
acq | Stream to work on. |
|
static |
Waits infinitely for the next acquired image and returns it.
Dispose the returned MultiPartImage when not needed anymore!
The returned image is not necessary the newest. If more images where acquired since the last call to this method, the content is the oldest not collected image buffer by default.
This method uses an asynchronous wrapper to make asynchronous handling easier with the CVB acquisition engine. As a side effect using this interface is not as efficient as calling ImageStream.Wait() directly.
stream | Stream to work on. |
|
static |
Waits for the next acquired image and returns it, abortable by the cancellation token.
Dispose the returned MultiPartImage when not needed anymore!
The returned image is not necessary the newest. If more images where acquired since the last call to this method, the content is the oldest not collected image buffer by default.
This method uses an asynchronous wrapper to make asynchronous handling easier with the CVB acquisition engine. As a side effect using this interface is not as efficient as calling ImageStream.Wait() directly.
stream | Stream to work on. |
cancellationToken | Token to cancel the wait. |
|
static |
Waits infinitely for the next acquired point cloud and returns it.
Dispose the returned PointCloud when not needed anymore!
The returned point cloud is not necessary the newest. If more point clouds where acquired since the last call to this method, the content is the oldest not collected point cloud buffer by default.
This method uses an asynchronous wrapper to make asynchronous handling easier with the CVB acquisition engine. As a side effect using this interface is not as efficient as calling PointCloudStream.Wait() directly.
stream | Stream to work on. |
|
static |
Waits for the next acquired point cloud and returns it, abortable by the cancellation token.
Dispose the returned PointCloud when not needed anymore!
The returned point cloud is not necessary the newest. If more point clouds where acquired since the last call to this method, the content is the oldest not collected point cloud buffer by default.
This method uses an asynchronous wrapper to make asynchronous handling easier with the CVB acquisition engine. As a side effect using this interface is not as efficient as calling PointCloudStream.Wait() directly.
stream | Stream to work on. |
cancellationToken | Token to cancel the wait. |
|
static |
Waits for the given timeout for the next acquired composite.
Attention:
it is generally not safe to call the wait method from different threads on the same object!
Dispose the returned Composite when not needed anymore!
The returned composite is not necessary the newest. If more point clouds where acquired since the last call to this method, the content is the oldest not collected composite buffer by default.
This method uses an asynchronous wrapper to make asynchronous handling easier with the CVB acquisition engine. As a side effect using this interface is not as efficient as calling CompositeStream.WaitFor(UsTimeSpan) directly.
stream | Stream to work on. |
timeout | Time to wait before timeout. |
|
static |
Waits for the given timeout for the next acquired composite.
Attention:
it is generally not safe to call the wait method from different threads on the same object!
Dispose the returned Composite when not needed anymore!
The returned composite is not necessary the newest. If more point clouds where acquired since the last call to this method, the content is the oldest not collected composite buffer by default.
This method uses an asynchronous wrapper to make asynchronous handling easier with the CVB acquisition engine. As a side effect using this interface is not as efficient as calling CompositeStream.WaitFor(UsTimeSpan) directly.
stream | Stream to work on. |
timeout | Time to wait before timeout. |
cancellationToken | Token to cancel the wait. |
|
static |
Waits for the given timeSpan for the next acquired image.
Attention:
it is generally not safe to call the wait method from different threads on the same object!
Dispose the returned Image when not needed anymore!
By default the returned image content is only guaranteed to stay unchanged until the next call to this method; afterwards the returned image is normally disposed. Thus it is normally not save to use this image in a display.
The returned image is not necessary the newest. If more images where acquired since the last call to this method, the content is the oldest not collected image buffer by default.
This method uses an asynchronous wrapper to make asynchronous handling easier with the CVB acquisition engine. As a side effect using this interface is not as efficient as calling IAcquisition.WaitFor(UsTimeSpan) directly.
acq | Stream to work on. |
timeSpan | Time span to wait for (millisecond granularity). |
|
static |
Waits for the given timeout for the next acquired image.
Attention:
it is generally not safe to call the wait method from different threads on the same object!
Dispose the returned MultiPartImage when not needed anymore!
The returned image is not necessary the newest. If more images where acquired since the last call to this method, the content is the oldest not collected image buffer by default.
This method uses an asynchronous wrapper to make asynchronous handling easier with the CVB acquisition engine. As a side effect using this interface is not as efficient as calling ImageStream.WaitFor(UsTimeSpan) directly.
stream | Stream to work on. |
timeout | Time to wait before timeout. |
|
static |
Waits for the given timeout for the next acquired image.
Attention:
it is generally not safe to call the wait method from different threads on the same object!
Dispose the returned MultiPartImage when not needed anymore!
The returned image is not necessary the newest. If more images where acquired since the last call to this method, the content is the oldest not collected image buffer by default.
This method uses an asynchronous wrapper to make asynchronous handling easier with the CVB acquisition engine. As a side effect using this interface is not as efficient as calling ImageStream.WaitFor(UsTimeSpan) directly.
stream | Stream to work on. |
timeout | Time to wait before timeout. |
cancellationToken | Token to cancel the wait. |
|
static |
Waits for the given timeout for the next acquired point cloud.
Attention:
it is generally not safe to call the wait method from different threads on the same object!
Dispose the returned PointCloud when not needed anymore!
The returned point cloud is not necessary the newest. If more point clouds where acquired since the last call to this method, the content is the oldest not collected point cloud buffer by default.
This method uses an asynchronous wrapper to make asynchronous handling easier with the CVB acquisition engine. As a side effect using this interface is not as efficient as calling PointCloudStream.WaitFor(UsTimeSpan) directly.
stream | Stream to work on. |
timeout | Time to wait before timeout. |
|
static |
Waits for the given timeout for the next acquired point cloud.
Attention:
it is generally not safe to call the wait method from different threads on the same object!
Dispose the returned PointCloud when not needed anymore!
The returned point cloud is not necessary the newest. If more point clouds where acquired since the last call to this method, the content is the oldest not collected point cloud buffer by default.
This method uses an asynchronous wrapper to make asynchronous handling easier with the CVB acquisition engine. As a side effect using this interface is not as efficient as calling PointCloudStream.WaitFor(UsTimeSpan) directly.
stream | Stream to work on. |
timeout | Time to wait before timeout. |
cancellationToken | Token to cancel the wait. |