Foundation (Arithmetic.dll) 14.0
Functions with 1 input image and 1 output image

Functions

cvbres_t Cut16to8Bit (IMG InImage, cvbdim_t InPlane, cvbval_t Offset, IMG &OutImage)
 Right-shifts the given image bitwise by the given offset. More...
 
cvbres_t Cut16to8BitVPAT (IMG InImage, cvbdim_t InPlane, cvbval_t Offset, IMG &OutImage)
 Right-shifts the given image bitwise by the given offset. More...
 
cvbres_t Ext8to16Bit (IMG InImage, cvbdim_t InPlane, cvbval_t Offset, IMG &OutImage)
 Left-shifts the given image bitwise by the given offset. More...
 
cvbres_t Ext8to16BitVPAT (IMG InImage, cvbdim_t InPlane, cvbval_t Offset, IMG &OutImage)
 Left-shifts the given image bitwise by the given offset. More...
 
cvbres_t LUT16 (IMG InImage, cvbdim_t InPlane, TLUT16 Lut, IMG &OutImage)
 The 16-bit input image is linked to the one-dimensional LUT of the type TLUT16. More...
 
cvbres_t LUT16VPAT (IMG InImage, cvbdim_t InPlane, TLUT16 Lut, IMG &OutImage)
 The 16-bit input image is linked to the one-dimensional LUT of the type TLUT16. More...
 
cvbres_t LUT8 (IMG InImage, cvbdim_t InPlane, TLUT8 Lut, IMG &OutImage)
 The 8-bit input image is linked to the one-dimensional LUT of the type TLUT8. More...
 
cvbres_t LUT8VPAT (IMG InImage, cvbdim_t InPlane, TLUT8 Lut, IMG &OutImage)
 The 8-bit input image is linked to the one-dimensional LUT of the type TLUT8. More...
 
cvbres_t MulDiv16 (IMG InImage, cvbdim_t InPlane, cvbval_t Mode, double Gain, cvbdim_t Offset, IMG &OutImage)
 The desired plane of the 16-bit input image is multiplied or divided pixel by pixel by the Gain and an Offset is added. More...
 
cvbres_t MulDiv16VPAT (IMG InImage, cvbdim_t InPlane, cvbval_t Mode, double Gain, cvbval_t Offset, IMG &OutImage)
 The desired plane of the 16-bit input image is multiplied or divided pixel by pixel by the Gain and an Offset is added. More...
 
cvbres_t MulDiv8 (IMG InImage, cvbdim_t InPlane, cvbval_t Mode, double Gain, cvbval_t Offset, IMG &OutImage)
 The desired plane of the 8-bit input image is multiplied or divided pixel by pixel by the Gain and an Offset is added. More...
 
cvbres_t MulDiv8VPAT (IMG InImage, cvbdim_t InPlane, cvbval_t Mode, double Gain, cvbval_t Offset, IMG &OutImage)
 The desired plane of the 8-bit input image is multiplied or divided pixel by pixel by the Gain and an Offset is added. More...
 

Detailed Description

Function Documentation

◆ Cut16to8Bit()

cvbres_t Cut16to8Bit ( IMG  InImage,
cvbdim_t  InPlane,
cvbval_t  Offset,
IMG &  OutImage 
)

Right-shifts the given image bitwise by the given offset.

Computer monitors can only display gray scale images which have a depth of 8 bits (256 shades of gray) correctly. If multiple-bit images or so called high-bit images (of 10, 12, 16 bits) are displayed, this causes overflows. The gray scales >>spill over<< and start again at black (0) in the case of values exceeding 255 (white). In order to be able to display images like this correctly, it is possible to extract the desired 8-bit data.

This function can be used to shift the visible 8-bit window onto the 16-bit data via a bitwise offset. It makes sense to shift the visible area over the top 8 bits of the original data.

The output image, which has a depth of 8 bits, contains the result of the operation. The OutImage is created within the function if it is NULL. The OutImage must always be released via the ReleaseObject function if the image is not needed anymore in order to prevent a memory leak in the application. If a valid and compatible output image is given it is reused and shared.

Attention
This function only works on linear images.
Parameters
[in]InImageHandle of input image (16-bit image).
[in]InPlaneActive plane of input image to process.
[in]OffsetBit offset around which the extracted 8 bits are shifted.
[out]OutImageHandle of output image (8-bit image).
Returns
0 : OK
otherwise CVBARI_RETURNCODE.
Supported platforms:
Win32
Win64
Linux

◆ Cut16to8BitVPAT()

cvbres_t Cut16to8BitVPAT ( IMG  InImage,
cvbdim_t  InPlane,
cvbval_t  Offset,
IMG &  OutImage 
)

Right-shifts the given image bitwise by the given offset.

Computer monitors can only display gray scale images which have a depth of 8 bits (256 shades of gray) correctly. If multiple-bit images or so called high-bit images (of 10, 12, 16 bits) are displayed, this causes overflows. The gray scales >>spill over<< and start again at black (0) in the case of values exceeding 255 (white). In order to be able to display images like this correctly, it is possible to extract the desired 8-bit data.

This function can be used to shift the visible 8-bit window onto the 16-bit data via a bitwise offset. It makes sense to shift the visible area over the top 8 bits of the original data.

The output image, which has a depth of 8 bits, contains the result of the operation. The OutImage is created within the function if it is NULL. The OutImage must always be released via the ReleaseObject function if the image is not needed anymore in order to prevent a memory leak in the application. If a valid and compatible output image is given it is reused and shared.

Attention
This function works on all CVB images, but is slower than the linear version.
Parameters
[in]InImageHandle of input image (16-bit image).
[in]InPlaneActive plane of input image to process.
[in]OffsetBit offset around which the extracted 8 bits are shifted.
[out]OutImageHandle of output image (8-bit image).
Returns
0 : OK
otherwise CVBARI_RETURNCODE.
Supported platforms:
Win32
Win64
Linux

◆ Ext8to16Bit()

cvbres_t Ext8to16Bit ( IMG  InImage,
cvbdim_t  InPlane,
cvbval_t  Offset,
IMG &  OutImage 
)

Left-shifts the given image bitwise by the given offset.

If 8-bit and 16-bit images should be combined it is necessary to convert the 8-bit image to a 16-bit image. This function creates an 16-bit output image out of the 8-bit input image. The parameter Offset defines the position of the 8-bits in the 16-bite frame.

The output image, which has a depth of 16 bits, contains the result of the operation. The OutImage is created within the function if it is NULL. The OutImage must always be released via the ReleaseObject function if the image is not needed anymore in order to prevent a memory leak in the application. If a valid and compatible output image is given it is reused and shared.

Attention
This function only works on linear images.
Parameters
[in]InImageHandle of input image (8-bit image).
[in]InPlaneActive plane of input image to process.
[in]OffsetBit offset around which the extracted 8 bits are shifted
[out]OutImageHandle of output image (16-bit image).
Returns
0 : OK
otherwise CVBARI_RETURNCODE.
Supported platforms:
Win32
Win64
Linux

◆ Ext8to16BitVPAT()

cvbres_t Ext8to16BitVPAT ( IMG  InImage,
cvbdim_t  InPlane,
cvbval_t  Offset,
IMG &  OutImage 
)

Left-shifts the given image bitwise by the given offset.

If 8-bit and 16-bit images should be combined it is necessary to convert the 8-bit image to a 16-bit image. This function creates an 16-bit output image out of the 8-bit input image. The parameter Offset defines the position of the 8-bits in the 16-bite frame.

The output image, which has a depth of 16 bits, contains the result of the operation. The OutImage is created within the function if it is NULL. The OutImage must always be released via the ReleaseObject function if the image is not needed anymore in order to prevent a memory leak in the application. If a valid and compatible output image is given it is reused and shared.

Attention
This function works on all CVB images, but is slower than the linear version.
Parameters
[in]InImageHandle of input image (8-bit image).
[in]InPlaneActive plane of input image to process.
[in]OffsetBit offset around which the extracted 8 bits are shifted
[out]OutImageHandle of output image (16-bit image).
Returns
0 : OK
otherwise CVBARI_RETURNCODE.
Supported platforms:
Win32
Win64
Linux

◆ LUT16()

cvbres_t LUT16 ( IMG  InImage,
cvbdim_t  InPlane,
TLUT16  Lut,
IMG &  OutImage 
)

The 16-bit input image is linked to the one-dimensional LUT of the type TLUT16.

The output image, which has a depth of 16 bits, contains the result of the operation. The user must define the LUT prior to use. The OutImage is created within the function if it is NULL. The OutImage must always be released via the ReleaseObject function if the image is not needed anymore in order to prevent a memory leak in the application. If a valid and compatible output image is given it is reused and shared.

Attention
This function only works on linear images.
Parameters
[in]InImageHandle of input image (16-bit image).
[in]InPlaneActive plane of input image to process.
[in]LutOne-dimensional 16-bit LUT (see TLUT16).
[out]OutImageHandle of output image (16-bit image).
Returns
0 : OK
otherwise CVBARI_RETURNCODE.
Supported platforms:
Win32
Win64
Linux

◆ LUT16VPAT()

cvbres_t LUT16VPAT ( IMG  InImage,
cvbdim_t  InPlane,
TLUT16  Lut,
IMG &  OutImage 
)

The 16-bit input image is linked to the one-dimensional LUT of the type TLUT16.

The output image, which has a depth of 16 bits, contains the result of the operation. The user must define the LUT prior to use. The OutImage is created within the function if it is NULL. The OutImage must always be released via the ReleaseObject function if the image is not needed anymore in order to prevent a memory leak in the application. If a valid and compatible output image is given it is reused and shared.

Attention
This function works on all CVB images, but is slower than the linear version.
Parameters
[in]InImageHandle of input image (16-bit image).
[in]InPlaneActive plane of input image to process.
[in]LutOne-dimensional 16-bit LUT (see TLUT16).
[out]OutImageHandle of output image (16-bit image).
Returns
0 : OK
otherwise CVBARI_RETURNCODE.
Supported platforms:
Win32
Win64
Linux

◆ LUT8()

cvbres_t LUT8 ( IMG  InImage,
cvbdim_t  InPlane,
TLUT8  Lut,
IMG &  OutImage 
)

The 8-bit input image is linked to the one-dimensional LUT of the type TLUT8.

The output image, which has a depth of 8 bits, contains the result of the operation. The user must define the LUT prior to use. The OutImage is created within the function if it is NULL. The OutImage must always be released via the ReleaseObject function if the image is not needed anymore in order to prevent a memory leak in the application. If a valid and compatible output image is given it is reused and shared.

Attention
This function only works on linear images.
Parameters
[in]InImageHandle of input image (8-bit image).
[in]InPlaneActive plane of input image to process.
[in]LutOne-dimensional 8-bit LUT (see TLUT8).
[out]OutImageHandle of output image (8-bit image).
Returns
0 : OK
otherwise CVBARI_RETURNCODE.
Supported platforms:
Win32
Win64
Linux

◆ LUT8VPAT()

cvbres_t LUT8VPAT ( IMG  InImage,
cvbdim_t  InPlane,
TLUT8  Lut,
IMG &  OutImage 
)

The 8-bit input image is linked to the one-dimensional LUT of the type TLUT8.

The output image, which has a depth of 8 bits, contains the result of the operation. The user must define the LUT prior to use. The OutImage is created within the function if it is NULL. The OutImage must always be released via the ReleaseObject function if the image is not needed anymore in order to prevent a memory leak in the application. If a valid and compatible output image is given it is reused and shared.

Attention
This function works on all CVB images, but is slower than the linear version.
Parameters
[in]InImageHandle of input image (8-bit image).
[in]InPlaneActive plane of input image to process.
[in]LutOne-dimensional 8-bit LUT (see TLUT8).
[out]OutImageHandle of output image (8-bit image).
Returns
0 : OK
otherwise CVBARI_RETURNCODE.
Supported platforms:
Win32
Win64
Linux

◆ MulDiv16()

cvbres_t MulDiv16 ( IMG  InImage,
cvbdim_t  InPlane,
cvbval_t  Mode,
double  Gain,
cvbdim_t  Offset,
IMG &  OutImage 
)

The desired plane of the 16-bit input image is multiplied or divided pixel by pixel by the Gain and an Offset is added.

If the resulting value does not fit into 16-bit an overflow will happen.

The output image, which has a depth of 16 bits, contains the result of the operation. The OutImage is created within the function if it is NULL. The OutImage must always be released via the ReleaseObject function if the image is not needed anymore in order to prevent a memory leak in the application. If a valid and compatible output image is given it is reused and shared.

The function Cut16to8Bit can be used in order to ensure that the output image is displayed correctly.

Attention
This function only works on linear images.
Parameters
[in]InImageHandle of input image (16-bit image).
[in]InPlaneActive plane of input image to process.
[in]ModeOne of the CVBARI_MULDIV_MODE operations.
[in]GainConstant multiplication factor.
[in]OffsetConstant offset to be added.
[out]OutImageHandle of output image (16-bit image).
Returns
0 : OK
otherwise CVBARI_RETURNCODE.
Supported platforms:
Win32
Win64
Linux

◆ MulDiv16VPAT()

cvbres_t MulDiv16VPAT ( IMG  InImage,
cvbdim_t  InPlane,
cvbval_t  Mode,
double  Gain,
cvbval_t  Offset,
IMG &  OutImage 
)

The desired plane of the 16-bit input image is multiplied or divided pixel by pixel by the Gain and an Offset is added.

If the resulting value does not fit into 16-bit an overflow will happen.

The output image, which has a depth of 16 bits, contains the result of the operation. The OutImage is created within the function if it is NULL. The OutImage must always be released via the ReleaseObject function if the image is not needed anymore in order to prevent a memory leak in the application. If a valid and compatible output image is given it is reused and shared.

The function Cut16to8Bit can be used in order to ensure that the output image is displayed correctly.

Attention
This function works on all CVB images, but is slower than the linear version.
Parameters
[in]InImageHandle of input image (16-bit image).
[in]InPlaneActive plane of input image to process.
[in]ModeOne of the CVBARI_MULDIV_MODE operations.
[in]GainConstant multiplication factor.
[in]OffsetConstant offset to be added.
[out]OutImageHandle of output image (16-bit image).
Returns
0 : OK
otherwise CVBARI_RETURNCODE.
Supported platforms:
Win32
Win64
Linux

◆ MulDiv8()

cvbres_t MulDiv8 ( IMG  InImage,
cvbdim_t  InPlane,
cvbval_t  Mode,
double  Gain,
cvbval_t  Offset,
IMG &  OutImage 
)

The desired plane of the 8-bit input image is multiplied or divided pixel by pixel by the Gain and an Offset is added.

If the resulting value does not fit into 8-bit an overflow will happen.

The output image, which has a depth of 8 bits, contains the result of the operation. The OutImage is created within the function if it is NULL. The OutImage must always be released via the ReleaseObject function if the image is not needed anymore in order to prevent a memory leak in the application. If a valid and compatible output image is given it is reused and shared.

Attention
This function only works on linear images.
Parameters
[in]InImageHandle of input image (8-bit image).
[in]InPlaneActive plane of input image to process.
[in]ModeOne of the CVBARI_MULDIV_MODE operations.
[in]GainConstant multiplication factor.
[in]OffsetConstant offset to be added.
[out]OutImageHandle of output image (8-bit image).
Returns
0 : OK
otherwise CVBARI_RETURNCODE.
Supported platforms:
Win32
Win64
Linux

◆ MulDiv8VPAT()

cvbres_t MulDiv8VPAT ( IMG  InImage,
cvbdim_t  InPlane,
cvbval_t  Mode,
double  Gain,
cvbval_t  Offset,
IMG &  OutImage 
)

The desired plane of the 8-bit input image is multiplied or divided pixel by pixel by the Gain and an Offset is added.

If the resulting value does not fit into 8-bit an overflow will happen.

The output image, which has a depth of 8 bits, contains the result of the operation. The OutImage is created within the function if it is NULL. The OutImage must always be released via the ReleaseObject function if the image is not needed anymore in order to prevent a memory leak in the application. If a valid and compatible output image is given it is reused and shared.

Attention
This function works on all CVB images, but is slower than the linear version.
Parameters
[in]InImageHandle of input image (8-bit image).
[in]InPlaneActive plane of input image to process.
[in]ModeOne of the CVBARI_MULDIV_MODE operations.
[in]GainConstant multiplication factor.
[in]OffsetConstant offset to be added.
[out]OutImageHandle of output image (8-bit image).
Returns
0 : OK
otherwise CVBARI_RETURNCODE.
Supported platforms:
Win32
Win64
Linux