Impact Acquire SDK .NET
Display Functions

Classes

class  ImageDisplay
 A class that can be used for displaying images within existing windows or GUI elements that can provide a window handle. More...
 
class  ImageDisplayExtensions
 Additional methods to extend the functionality of the class mv.impact.acquire.display.ImageDisplay. More...
 
class  ImageDisplayWindow
 A class that can be used to display images in a window. More...
 

Enumerations

enum  TDisplayMode : uint {
  DM_Default = 0 ,
  DM_Fastest ,
  DM_DDrawOverlay ,
  DM_FullScreen
}
 Defines valid display modes. More...
 
enum  TFormatFlags : int {
  ffRGB888xPacked ,
  ffRGB888xPlanar ,
  ffMono ,
  ffYUY2 ,
  ffYUV422Planar ,
  ffRGB2BytePacked ,
  ffUYVY ,
  ffMonoPacked_V2 ,
  ffBGR888xPacked ,
  ffUYV444 ,
  ffYUV444 ,
  ffBGR2BytePacked_V2 ,
  ffMonoPacked_V1 ,
  ffYUV411_UYYVYY_Packed
}
 Defines valid display pixel formats. More...
 
enum  TImageDisplayError : uint {
  IDE_NoError = 0 ,
  IDE_OutOfMemory ,
  IDE_UpdateFailed ,
  IDE_InvalidHandle ,
  IDE_InternalError ,
  IDE_DirectDrawAccessFailed
}
 Defines valid error values for this module. More...
 
enum  TInterpolationMode : int {
  IM_NEAREST_NEIGHBOUR = 0 ,
  IM_LINEAR ,
  IM_CUBIC
}
 Defines valid scaler interpolation modes. More...
 

Functions

unsafe int ConvertFormatFromPFNC32 (int pixelFormat, TFormatFlags *pFormat, int *pBitsPerPixel)
 Converts a PFNC pixel format into a format that can be digested by this module.
 

Detailed Description

Classes and functions that can be used to display images.

Enumeration Type Documentation

◆ TDisplayMode

enum TDisplayMode : uint

Defines valid display modes.

These enum defines all the values that can be assigned to the property mv.impact.acquire.display.ImageDisplay.displayMode.

Enumerator
DM_Default 

The default display mode.

This display mode is capable of scaling the image. Scaling however will result in additional CPU load.

In this mode, the bitmap rectangle will always be scaled to fit into the display rectangle.

In this mode(and in this mode only) overlay callbacks will be executed.

DM_Fastest 

The fastest display mode.

In this mode there will be no scaling and no overlay callbacks but it will operate with the lowest possible CPU load.

DM_DDrawOverlay 

DirectDraw® mode.

This mode will use DirectDraw® for displaying the image.

In this mode, the bitmap rectangle will always be scaled to fit into the display rectangle.

DM_FullScreen 

Fullscreen (Exclusive) DirectDraw® mode.

This mode will use DirectDraw® exclusive mode for displaying the image.

In this mode, the bitmap rectangle will always be scaled to fit into the display rectangle.

◆ TFormatFlags

enum TFormatFlags : int

Defines valid display pixel formats.

Enumerator
ffRGB888xPacked 

Valid values for bits per pixel in this format: 15, 16, 24, 32; pData[0] points to the packed image data.

ffRGB888xPlanar 

Valid values for bits per pixel in this format: not used; 8 bit per plane, pData[0] points to the Blue, pData[1] points to the Green, pData[2] points to the Red plane.

ffMono 

Valid values for bits per pixel in this format: 8, 10, 12, 14, 16, LSB aligned.

ffYUY2 

Valid values for bits per pixel in this format: 16, 20, YUV422: 8-10 bit Y | 8-10 bit U | 8-10 bit Y | 8-10 bit V.

ffYUV422Planar 

Valid values for bits per pixel in this format: not used, YUV422 planar.

ffRGB2BytePacked 

Valid values for bits per pixel in this format: 30, 36, 42 or 48 10-16 bits per color component RGB packed data.

ffUYVY 

Valid values for bits per pixel in this format: 16, 20, YUV422: 8-10 bit U | 8-10 bit Y | 8-10 bit V | 8-10 bit Y.

ffMonoPacked_V2 

Valid values for bits per pixel in this format: 12, 8 MSB(1), 4 LSBs(1+2), 8MSB(2).

ffBGR888xPacked 

Valid values for bits per pixel in this format: 15, 16, 24, 32; pData[0] points to the packed image data.

ffUYV444 

Valid values for bits per pixel in this format: 24 or 48.

ffYUV444 

Valid values for bits per pixel in this format: 48.

ffBGR2BytePacked_V2 

Valid values for bits per pixel in this format: 30 (R=pix&0x3FF, G=(pix>>10)&0x3FF, B=(pix>>20)&3FF).

ffMonoPacked_V1 

Valid values for bits per pixel in this format: 12, 8 MSB(1), 4 LSB(1) + 4 MSB(2), 8LSB(2).

ffYUV411_UYYVYY_Packed 

Valid values for bits per pixel in this format: not used, YUV411: 8 bit U | 8 bit Y1 | 8 bit Y2 | 8 bit V | 8 bit Y3 | 8 bit Y4.

◆ TImageDisplayError

enum TImageDisplayError : uint

Defines valid error values for this module.

Enumerator
IDE_NoError 

No error occurred since the last time the error code was queried.

IDE_OutOfMemory 

There is not enough memory available to perform the requested operation.

IDE_UpdateFailed 

The update failed. This is an internal error.

IDE_InvalidHandle 

One or more of the handles passed to a function where invalid.

IDE_InternalError 

Unspecified internal error.

IDE_DirectDrawAccessFailed 

Calling a DirectDraw® function did fail.

◆ TInterpolationMode

enum TInterpolationMode : int

Defines valid scaler interpolation modes.

These enum defines all the values that can be passed to the property mv.impact.acquire.display.ImageDisplay.interpolationMode.

Enumerator
IM_NEAREST_NEIGHBOUR 

Nearest neighbor interpolation (default).

Fast but with reduced quality.

IM_LINEAR 

Linear interpolation.

Both quality and CPU load will be average.

IM_CUBIC 

Cubic interpolation.

Best quality, highest CPU load.

Function Documentation

◆ ConvertFormatFromPFNC32()

unsafe int ConvertFormatFromPFNC32 ( int pixelFormat,
TFormatFlags * pFormat,
int * pBitsPerPixel )
inline

Converts a PFNC pixel format into a format that can be digested by this module.

Returns
  • 1 if successful.
  • 0 when the PFNC format cannot be displayed properly by this module.
Parameters
[in]pixelFormatThe PFNC pixel format to convert as unsigned int.
[out]pFormatA pointer to variable that receives the format flags that can be passed to functions of this library.
[out]pBitsPerPixelA pointer to variable that receives the bits per pixel for the format specified by pixelFormat.