Image Manager (CVCImg.dll) 14.0
Drawing

Functions for destructive drawing. More...

Enumerations

enum  TDrawAntiAliasMode { AAM_Off = 0 }
 
enum  TDrawMode { DM_Set = 0 , DM_AND = 1 , DM_OR = 2 }
 

Functions

cvbres_t DrawAreaInImage (IMG Image, cvbdim_t PlaneIndex, TArea Area, double Intensity, cvbval_t Thickness, TDrawMode DrawMode, TDrawAntiAliasMode AntiAliasMode)
 Draws the outline of an area (parallelogram) in the given Image plane at PlaneIndex. More...
 
cvbres_t DrawCircleInImage (IMG Image, cvbdim_t PlaneIndex, cvbdim_t CenterX, cvbdim_t CenterY, cvbdim_t Radius, double Intensity, cvbval_t Thickness, TDrawMode DrawMode, TDrawAntiAliasMode AntiAliasMode)
 Draws the outline of a circle in the given Image plane at PlaneIndex. More...
 
cvbres_t DrawEllipseInImage (IMG Image, cvbdim_t PlaneIndex, cvbdim_t CenterX, cvbdim_t CenterY, cvbdim_t LengthAxisA, cvbdim_t LengthAxisB, double Rotation, double Intensity, cvbval_t Thickness, TDrawMode DrawMode, TDrawAntiAliasMode AntiAliasMode)
 Draws the outline of an ellipse in the given Image plane at PlaneIndex. More...
 
cvbres_t DrawLineInImage (IMG Image, cvbdim_t PlaneIndex, cvbdim_t X0, cvbdim_t Y0, cvbdim_t X1, cvbdim_t Y1, double Intensity, cvbval_t Thickness, TDrawMode DrawMode, TDrawAntiAliasMode AntiAliasMode)
 Draws a line in the given Image plane at PlaneIndex. More...
 
cvbres_t FillAreaInImage (IMG Image, cvbdim_t PlaneIndex, TArea Area, double Intensity, TDrawMode DrawMode, TDrawAntiAliasMode AntiAliasMode)
 Draws a filled area (parallelogram) in the given Image plane at PlaneIndex. More...
 
cvbres_t FillCircleInImage (IMG Image, cvbdim_t PlaneIndex, cvbdim_t CenterX, cvbdim_t CenterY, cvbdim_t Radius, double Intensity, TDrawMode DrawMode, TDrawAntiAliasMode AntiAliasMode)
 Draws a filled circle in the given Image plane at PlaneIndex. More...
 
cvbres_t FillEllipseInImage (IMG Image, cvbdim_t PlaneIndex, cvbdim_t CenterX, cvbdim_t CenterY, cvbdim_t LengthAxisA, cvbdim_t LengthAxisB, double Rotation, double Intensity, TDrawMode DrawMode, TDrawAntiAliasMode AntiAliasMode)
 Draws a filled ellipse in the given Image plane at PlaneIndex. More...
 
cvbres_t FloodFillBitwise (IMG Image, cvbdim_t PlaneIndex, cvbdim_t X, cvbdim_t Y, TDrawMode DrawMode, cvbval_t Intensity)
 Fills a closed region in the given Image plane at PlaneIndex with a given Intensity using a selectable DrawMode. More...
 
cvbres_t FloodFillMono (IMG Image, cvbdim_t PlaneIndex, cvbdim_t X, cvbdim_t Y, double Intensity, double MaxDelta)
 Fills a closed region in the given Image plane at PlaneIndex with a given Intensity. More...
 

Detailed Description

Functions for destructive drawing.

Enumeration Type Documentation

◆ TDrawAntiAliasMode

Enumerator
AAM_Off 

No anti-aliasing used (fast).

◆ TDrawMode

enum TDrawMode
Enumerator
DM_Set 

Overwrite the pixel value with new intensity.

DM_AND 

Bit-wise and operation with intensity.

Not supported on DT_Float images.

DM_OR 

Bit-wise or operation with intensity.

Not supported on DT_Float images.

Function Documentation

◆ DrawAreaInImage()

cvbres_t DrawAreaInImage ( IMG  Image,
cvbdim_t  PlaneIndex,
TArea  Area,
double  Intensity,
cvbval_t  Thickness,
TDrawMode  DrawMode,
TDrawAntiAliasMode  AntiAliasMode 
)

Draws the outline of an area (parallelogram) in the given Image plane at PlaneIndex.

The following BytesPerPixel as input for signed and unsigned integer cvbdatatype_t values are supported: 1, 2, 4, and 8. For floating point cvbdatatype_t values only 4 and 8 BytesPerPixel are supported.

Note
Despite using the TArea this function does not use the image coordinate system to be in line with the other drawing functions.
Parameters
[in]ImageImage object handle to draw TArea in.
[in]PlaneIndexPlane index to draw TArea in.
[in]AreaArea in pixel coordinates to draw.
[in]IntensityIntensity/gray value of area.
[in]ThicknessPositive, non-0 thickness of the area outline in pixels.
[in]DrawModeSpecifies how the new Intensity is applied.
[in]AntiAliasModeSpecifies whether or not anti-aliasing is to be used (currently only AAM_Off supported).
Returns
  • #CVC_ERROR (#CVC_E_OK) if successful.
  • #CVC_ERROR (#CVC_E_NOIMAGE) if Image is not a valid IImageVPA object.
  • #CVC_ERROR (#CVC_E_UNSUPPORTEDFEATURE) if AntiAliasMode is not AAM_Off.
  • #CVC_ERROR (#CVC_E_INVALIDDIMENSION) if PlaneIndex is out of range.
  • #CVC_ERROR (#CVC_E_PARAMETER) if Thickness or DrawMode has invalid values.
  • #CVC_ERROR (#CVC_E_INVALIDDATATYPE) if the cvbdatatype_t of the Image plane at PlaneIndex is not supported for the DrawMode.
See also
FillAreaInImage

◆ DrawCircleInImage()

cvbres_t DrawCircleInImage ( IMG  Image,
cvbdim_t  PlaneIndex,
cvbdim_t  CenterX,
cvbdim_t  CenterY,
cvbdim_t  Radius,
double  Intensity,
cvbval_t  Thickness,
TDrawMode  DrawMode,
TDrawAntiAliasMode  AntiAliasMode 
)

Draws the outline of a circle in the given Image plane at PlaneIndex.

The following BytesPerPixel as input for signed and unsigned integer cvbdatatype_t values are supported: 1, 2, 4, and 8. For floating point cvbdatatype_t values only 4 and 8 BytesPerPixel are supported.

Parameters
[in]ImageImage object handle to draw circle in.
[in]PlaneIndexPlane index to draw circle in.
[in]CenterXX pixel coordinate of the circle center.
[in]CenterYY pixel coordinate of the circle center.
[in]RadiusRadius of the circle in pixels.
[in]IntensityIntensity/gray value of circle.
[in]ThicknessPositive, non-0 thickness of the circle outline in pixels.
[in]DrawModeSpecifies how the new Intensity is applied.
[in]AntiAliasModeSpecifies whether or not anti-aliasing is to be used (currently only AAM_Off supported).
Returns
  • #CVC_ERROR (#CVC_E_OK) if successful.
  • #CVC_ERROR (#CVC_E_NOIMAGE) if Image is not a valid IImageVPA object.
  • #CVC_ERROR (#CVC_E_UNSUPPORTEDFEATURE) if AntiAliasMode is not AAM_Off.
  • #CVC_ERROR (#CVC_E_INVALIDDIMENSION) if PlaneIndex is out of range.
  • #CVC_ERROR (#CVC_E_PARAMETER) if Thickness or DrawMode has invalid values.
  • #CVC_ERROR (#CVC_E_INVALIDDATATYPE) if the cvbdatatype_t of the Image plane at PlaneIndex is not supported for the DrawMode.
See also
FillCircleInImage

◆ DrawEllipseInImage()

cvbres_t DrawEllipseInImage ( IMG  Image,
cvbdim_t  PlaneIndex,
cvbdim_t  CenterX,
cvbdim_t  CenterY,
cvbdim_t  LengthAxisA,
cvbdim_t  LengthAxisB,
double  Rotation,
double  Intensity,
cvbval_t  Thickness,
TDrawMode  DrawMode,
TDrawAntiAliasMode  AntiAliasMode 
)

Draws the outline of an ellipse in the given Image plane at PlaneIndex.

The first semi major is the one that coincides with the x-axis if the Rotation of the ellipse is 0°. The second semi major is the one that coincides with the y-axis if the Rotation of the ellipse is 0°.

The following BytesPerPixel as input for signed and unsigned integer cvbdatatype_t values are supported: 1, 2, 4, and 8. For floating point cvbdatatype_t values only 4 and 8 BytesPerPixel are supported.

Parameters
[in]ImageImage object handle to draw ellipse in.
[in]PlaneIndexPlane index to draw ellipse in.
[in]CenterXX pixel coordinate of the ellipse center.
[in]CenterYY pixel coordinate of the ellipse center.
[in]LengthAxisALength of the first semi major axis in pixels.
[in]LengthAxisBLength of the second semi major axis in pixels.
[in]RotationRotation of the ellipse in degrees.
[in]IntensityIntensity/gray value of ellipse.
[in]ThicknessPositive, non-0 thickness of the ellipse outline in pixels.
[in]DrawModeSpecifies how the new Intensity is applied.
[in]AntiAliasModeSpecifies whether or not anti-aliasing is to be used (currently only AAM_Off supported).
Returns
  • #CVC_ERROR (#CVC_E_OK) if successful.
  • #CVC_ERROR (#CVC_E_NOIMAGE) if Image is not a valid IImageVPA object.
  • #CVC_ERROR (#CVC_E_UNSUPPORTEDFEATURE) if AntiAliasMode is not AAM_Off.
  • #CVC_ERROR (#CVC_E_INVALIDDIMENSION) if PlaneIndex is out of range.
  • #CVC_ERROR (#CVC_E_PARAMETER) if Thickness or DrawMode has invalid values.
  • #CVC_ERROR (#CVC_E_INVALIDDATATYPE) if the cvbdatatype_t of the Image plane at PlaneIndex is not supported for the DrawMode.
See also
FillEllipseInImage

◆ DrawLineInImage()

cvbres_t DrawLineInImage ( IMG  Image,
cvbdim_t  PlaneIndex,
cvbdim_t  X0,
cvbdim_t  Y0,
cvbdim_t  X1,
cvbdim_t  Y1,
double  Intensity,
cvbval_t  Thickness,
TDrawMode  DrawMode,
TDrawAntiAliasMode  AntiAliasMode 
)

Draws a line in the given Image plane at PlaneIndex.

The following BytesPerPixel as input for signed and unsigned integer cvbdatatype_t values are supported: 1, 2, 4, and 8. For floating point cvbdatatype_t values only 4 and 8 BytesPerPixel are supported.

Parameters
[in]ImageImage object handle to draw line in.
[in]PlaneIndexPlane index to draw line in.
[in]X0X pixel coordinate of start point of line.
[in]Y0Y pixel coordinate of start point of line.
[in]X1X pixel coordinate of end point of line (inclusive).
[in]Y1Y pixel coordinate of end point of line (inclusive).
[in]IntensityIntensity/gray value of line.
[in]ThicknessPositive, non-0 thickness of the line in pixels.
[in]DrawModeSpecifies how the new Intensity is applied.
[in]AntiAliasModeSpecifies whether or not anti-aliasing is to be used (currently only AAM_Off supported).
Returns
  • #CVC_ERROR (#CVC_E_OK) if successful.
  • #CVC_ERROR (#CVC_E_NOIMAGE) if Image is not a valid IImageVPA object.
  • #CVC_ERROR (#CVC_E_UNSUPPORTEDFEATURE) if AntiAliasMode is not AAM_Off.
  • #CVC_ERROR (#CVC_E_INVALIDDIMENSION) if PlaneIndex is out of range.
  • #CVC_ERROR (#CVC_E_PARAMETER) if Thickness or DrawMode has invalid values.
  • #CVC_ERROR (#CVC_E_INVALIDDATATYPE) if the cvbdatatype_t of the Image plane at PlaneIndex is not supported for the DrawMode.

◆ FillAreaInImage()

cvbres_t FillAreaInImage ( IMG  Image,
cvbdim_t  PlaneIndex,
TArea  Area,
double  Intensity,
TDrawMode  DrawMode,
TDrawAntiAliasMode  AntiAliasMode 
)

Draws a filled area (parallelogram) in the given Image plane at PlaneIndex.

The following BytesPerPixel as input for signed and unsigned integer cvbdatatype_t values are supported: 1, 2, 4, and 8. For floating point cvbdatatype_t values only 4 and 8 BytesPerPixel are supported.

Note
Despite using the TArea this function does not use the image coordinate system to be in line with the other drawing functions.
Parameters
[in]ImageImage object handle to draw TArea in.
[in]PlaneIndexPlane index to draw TArea in.
[in]AreaArea in pixel coordinates to draw.
[in]IntensityIntensity/gray value of area.
[in]DrawModeSpecifies how the new Intensity is applied.
[in]AntiAliasModeSpecifies whether or not anti-aliasing is to be used (currently only AAM_Off supported).
Returns
  • #CVC_ERROR (#CVC_E_OK) if successful.
  • #CVC_ERROR (#CVC_E_NOIMAGE) if Image is not a valid IImageVPA object.
  • #CVC_ERROR (#CVC_E_UNSUPPORTEDFEATURE) if AntiAliasMode is not AAM_Off.
  • #CVC_ERROR (#CVC_E_INVALIDDIMENSION) if PlaneIndex is out of range.
  • #CVC_ERROR (#CVC_E_PARAMETER) if DrawMode has invalid value.
  • #CVC_ERROR (#CVC_E_INVALIDDATATYPE) if the cvbdatatype_t of the Image plane at PlaneIndex is not supported for the DrawMode.
See also
DrawAreaInImage

◆ FillCircleInImage()

cvbres_t FillCircleInImage ( IMG  Image,
cvbdim_t  PlaneIndex,
cvbdim_t  CenterX,
cvbdim_t  CenterY,
cvbdim_t  Radius,
double  Intensity,
TDrawMode  DrawMode,
TDrawAntiAliasMode  AntiAliasMode 
)

Draws a filled circle in the given Image plane at PlaneIndex.

The following BytesPerPixel as input for signed and unsigned integer cvbdatatype_t values are supported: 1, 2, 4, and 8. For floating point cvbdatatype_t values only 4 and 8 BytesPerPixel are supported.

Parameters
[in]ImageImage object handle to draw circle in.
[in]PlaneIndexPlane index to draw circle in.
[in]CenterXX pixel coordinate of the circle center.
[in]CenterYY pixel coordinate of the circle center.
[in]RadiusRadius of the circle in pixels.
[in]IntensityIntensity/gray value of circle.
[in]DrawModeSpecifies how the new Intensity is applied.
[in]AntiAliasModeSpecifies whether or not anti-aliasing is to be used (currently only AAM_Off supported).
Returns
  • #CVC_ERROR (#CVC_E_OK) if successful.
  • #CVC_ERROR (#CVC_E_NOIMAGE) if Image is not a valid IImageVPA object.
  • #CVC_ERROR (#CVC_E_UNSUPPORTEDFEATURE) if AntiAliasMode is not AAM_Off.
  • #CVC_ERROR (#CVC_E_INVALIDDIMENSION) if PlaneIndex is out of range.
  • #CVC_ERROR (#CVC_E_PARAMETER) if DrawMode has invalid value.
  • #CVC_ERROR (#CVC_E_INVALIDDATATYPE) if the cvbdatatype_t of the Image plane at PlaneIndex is not supported for the DrawMode.
See also
DrawCircleInImage

◆ FillEllipseInImage()

cvbres_t FillEllipseInImage ( IMG  Image,
cvbdim_t  PlaneIndex,
cvbdim_t  CenterX,
cvbdim_t  CenterY,
cvbdim_t  LengthAxisA,
cvbdim_t  LengthAxisB,
double  Rotation,
double  Intensity,
TDrawMode  DrawMode,
TDrawAntiAliasMode  AntiAliasMode 
)

Draws a filled ellipse in the given Image plane at PlaneIndex.

The first semi major is the one that coincides with the x-axis if the Rotation of the ellipse is 0°. The second semi major is the one that coincides with the y-axis if the Rotation of the ellipse is 0°.

The following BytesPerPixel as input for signed and unsigned integer cvbdatatype_t values are supported: 1, 2, 4, and 8. For floating point cvbdatatype_t values only 4 and 8 BytesPerPixel are supported.

Parameters
[in]ImageImage object handle to draw ellipse in.
[in]PlaneIndexPlane index to draw ellipse in.
[in]CenterXX pixel coordinate of the ellipse center.
[in]CenterYY pixel coordinate of the ellipse center.
[in]LengthAxisALength of the first semi major axis in pixels.
[in]LengthAxisBLength of the second semi major axis in pixels.
[in]RotationRotation of the ellipse in degrees.
[in]IntensityIntensity/gray value of ellipse.
[in]DrawModeSpecifies how the new Intensity is applied.
[in]AntiAliasModeSpecifies whether or not anti-aliasing is to be used (currently only AAM_Off supported).
Returns
  • #CVC_ERROR (#CVC_E_OK) if successful.
  • #CVC_ERROR (#CVC_E_NOIMAGE) if Image is not a valid IImageVPA object.
  • #CVC_ERROR (#CVC_E_UNSUPPORTEDFEATURE) if AntiAliasMode is not AAM_Off.
  • #CVC_ERROR (#CVC_E_INVALIDDIMENSION) if PlaneIndex is out of range.
  • #CVC_ERROR (#CVC_E_PARAMETER) if DrawMode has invalid value.
  • #CVC_ERROR (#CVC_E_INVALIDDATATYPE) if the cvbdatatype_t of the Image plane at PlaneIndex is not supported for the DrawMode.
See also
DrawEllipseInImage

◆ FloodFillBitwise()

cvbres_t FloodFillBitwise ( IMG  Image,
cvbdim_t  PlaneIndex,
cvbdim_t  X,
cvbdim_t  Y,
TDrawMode  DrawMode,
cvbval_t  Intensity 
)

Fills a closed region in the given Image plane at PlaneIndex with a given Intensity using a selectable DrawMode.

For boundary testing this function uses the Von Neumann neighborhood (4-connected). The given Intensity value is treated as the boundary intensity. The region is filled with the Intensity value depending on the DrawMode.

The following BytesPerPixel as input for signed and unsigned integer cvbdatatype_t values are supported: 1, 2, 4, and 8. For floating point cvbdatatype_t values only 4 and 8 BytesPerPixel are supported.

Note
The bitwise painting operations cannot be carried out on DT_Float image planes
Parameters
[in]ImageImage object handle to fill in.
[in]PlaneIndexPlane index to fill in.
[in]XX pixel coordinate of where to start the fill operation.
[in]YY pixel coordinate of where to start the fill operation.
[in]DrawModeSpecifies how the new Intensity is applied.
[in]IntensityNew intensity/gray value for filling and border value.
Returns
  • #CVC_ERROR (#CVC_E_OK) if successful.
  • #CVC_ERROR (#CVC_E_NOIMAGE) if Image is not a valid IImageVPA object.
  • #CVC_ERROR (#CVC_E_INVALIDDIMENSION) if PlaneIndex is out of range.
  • #CVC_ERROR (#CVC_E_INVALIDDATATYPE) if the cvbdatatype_t of the Image plane at PlaneIndex is not supported for the DrawMode.
See also
FloodFillMono

◆ FloodFillMono()

cvbres_t FloodFillMono ( IMG  Image,
cvbdim_t  PlaneIndex,
cvbdim_t  X,
cvbdim_t  Y,
double  Intensity,
double  MaxDelta 
)

Fills a closed region in the given Image plane at PlaneIndex with a given Intensity.

For boundary testing this function uses the Von Neumann neighborhood (4-connected). The given Intensity value ± MaxDelta is treated as the boundary intensity. The region is filled with the Intensity value.

The following BytesPerPixel as input for signed and unsigned integer cvbdatatype_t values are supported: 1, 2, 4, and 8. For floating point cvbdatatype_t values only 4 and 8 BytesPerPixel are supported.

Parameters
[in]ImageImage object handle to fill in.
[in]PlaneIndexPlane index to fill in.
[in]XX pixel coordinate of where to start the fill operation.
[in]YY pixel coordinate of where to start the fill operation.
[in]IntensityNew intensity/gray value for filling and border value.
[in]MaxDeltaDelta around Intensity at which the filling should stop.
Returns
  • #CVC_ERROR (#CVC_E_OK) if successful.
  • #CVC_ERROR (#CVC_E_NOIMAGE) if Image is not a valid IImageVPA object.
  • #CVC_ERROR (#CVC_E_INVALIDDIMENSION) if PlaneIndex is out of range.
  • #CVC_ERROR (#CVC_E_PARAMETER) if MaxDelta has invalid value.
  • #CVC_ERROR (#CVC_E_INVALIDDATATYPE) if the cvbdatatype_t of the Image plane at PlaneIndex is not supported.
See also
FloodFillBitwise