iDRS™ SDK 16
Loading...
Searching...
No Matches
CDespeckle_interface.h File Reference

Interface for CDespeckle wrapper. More...

Go to the source code of this file.

Functions

CDespeckle CDespeckle_Create (const CIDRS argIDRS, idrs_exception *pargException)
 Creates a new CDespeckle object.
 
void CDespeckle_Despeckle (CDespeckle argCDespeckle, CImage argImage, idrs_exception *pargException)
 Despeckle removes all the groups of connected pixels with a number of pixels below the SpeckleMaxSize property.
 
void CDespeckle_Despeckle2 (CDespeckle argCDespeckle, CImage argImage, const CPolygon argPolygon, idrs_exception *pargException)
 Despeckle removes all the groups of connected pixels with a number of pixels below the SpeckleMaxSize property.
 
void CDespeckle_SetSpeckleMaxSize (CDespeckle argCDespeckle, IDRS_UINT const uiSpeckleMaxSize, idrs_exception *pargException)
 Set the maximum size (area in pixels) of the connected pixels to be removed.
 
IDRS_UINT CDespeckle_GetSpeckleMaxSize (const CDespeckle argCDespeckle, idrs_exception *pargException)
 Get the maximum size (area in pixels) of the connected pixels to be removed.
 
void CDespeckle_SetDilatation (CDespeckle argCDespeckle, IDRS_UINT const uiDilatation, idrs_exception *pargException)
 Set the dilatation value (in pixels) that will be used during despeckling.
 
IDRS_UINT CDespeckle_GetDilatation (const CDespeckle argCDespeckle, idrs_exception *pargException)
 Get the dilatation value (in pixels) that will be used during despeckling.
 
void CDespeckle_SetDespeckleType (CDespeckle argCDespeckle, enum DespeckleType const evDespeckleType, idrs_exception *pargException)
 Set the despeckle type to perform.
 
enum DespeckleType CDespeckle_GetDespeckleType (const CDespeckle argCDespeckle, idrs_exception *pargException)
 Get the despeckle type to perform.
 
IDespeckleCallback CDespeckle_GetDespeckleCallback (const CDespeckle argCDespeckle, idrs_exception *pargException)
 Gets the callback used to indicate which groups of connected pixels to remove.
 
void CDespeckle_SetDespeckleCallback (CDespeckle argCDespeckle, IDespeckleCallback pDespeckleCallback, idrs_exception *pargException)
 Sets the callback used to indicate which groups of connected pixels to remove.
 
void CDespeckle_Destroy (CDespeckle argCDespeckle, idrs_exception *pargException)
 Destroys a CDespeckle handle.
 

Detailed Description

Interface for CDespeckle wrapper.

Function Documentation

◆ CDespeckle_Create()

CDespeckle CDespeckle_Create ( const CIDRS  argIDRS,
idrs_exception *  pargException 
)

Creates a new CDespeckle object.

Parameters
argIDRSThe iDRS
pargExceptionPointer to exception structure that will be filled if an exception occurs
Returns
The newly created CDespeckle object.
Remarks
Instances created by this method can also be provided to CImageOperation methods

◆ CDespeckle_Despeckle()

void CDespeckle_Despeckle ( CDespeckle  argCDespeckle,
CImage  argImage,
idrs_exception *  pargException 
)

Despeckle removes all the groups of connected pixels with a number of pixels below the SpeckleMaxSize property.

Those connected pixels are not removed if the distance to a larger connected component is below the Dilatation property. As a result only the isolated pixels get deleted.

Attention
Despeckling is only available for black and white images.
Parameters
argCDespeckleCDespeckle handle
argImageThe image to despeckle.
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ CDespeckle_Despeckle2()

void CDespeckle_Despeckle2 ( CDespeckle  argCDespeckle,
CImage  argImage,
const CPolygon  argPolygon,
idrs_exception *  pargException 
)

Despeckle removes all the groups of connected pixels with a number of pixels below the SpeckleMaxSize property.

Those connected pixels are not removed if the distance to a larger connected component is below the Dilatation property. As a result only the isolated pixels get deleted.

Attention
Despeckling is only available for black and white images.
Parameters
argCDespeckleCDespeckle handle
argImageThe image to despeckle.
argPolygonThe area to process.
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ CDespeckle_Destroy()

void CDespeckle_Destroy ( CDespeckle  argCDespeckle,
idrs_exception *  pargException 
)

Destroys a CDespeckle handle.

Parameters
argCDespeckleCDespeckle handle to destroy
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ CDespeckle_GetDespeckleCallback()

IDespeckleCallback CDespeckle_GetDespeckleCallback ( const CDespeckle  argCDespeckle,
idrs_exception *  pargException 
)

Gets the callback used to indicate which groups of connected pixels to remove.

Returns
The callback pointer
Parameters
argCDespeckleCDespeckle handle
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ CDespeckle_GetDespeckleType()

enum DespeckleType CDespeckle_GetDespeckleType ( const CDespeckle  argCDespeckle,
idrs_exception *  pargException 
)

Get the despeckle type to perform.

Remarks
Default value is set to DespeckleType::Black.
Parameters
argCDespeckleCDespeckle handle
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ CDespeckle_GetDilatation()

IDRS_UINT CDespeckle_GetDilatation ( const CDespeckle  argCDespeckle,
idrs_exception *  pargException 
)

Get the dilatation value (in pixels) that will be used during despeckling.

Remarks
Default value is set to 0.
Returns
The speckle max size.
Parameters
argCDespeckleCDespeckle handle
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ CDespeckle_GetSpeckleMaxSize()

IDRS_UINT CDespeckle_GetSpeckleMaxSize ( const CDespeckle  argCDespeckle,
idrs_exception *  pargException 
)

Get the maximum size (area in pixels) of the connected pixels to be removed.

Remarks
Default value is set to 12.
Returns
The speckle max size.
Parameters
argCDespeckleCDespeckle handle
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ CDespeckle_SetDespeckleCallback()

void CDespeckle_SetDespeckleCallback ( CDespeckle  argCDespeckle,
IDespeckleCallback  pDespeckleCallback,
idrs_exception *  pargException 
)

Sets the callback used to indicate which groups of connected pixels to remove.

Parameters
argCDespeckleCDespeckle handle
pDespeckleCallbackCallback pointer to set
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ CDespeckle_SetDespeckleType()

void CDespeckle_SetDespeckleType ( CDespeckle  argCDespeckle,
enum DespeckleType const  evDespeckleType,
idrs_exception *  pargException 
)

Set the despeckle type to perform.

Parameters
argCDespeckleCDespeckle handle
evDespeckleTypeThe despeckle type.
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ CDespeckle_SetDilatation()

void CDespeckle_SetDilatation ( CDespeckle  argCDespeckle,
IDRS_UINT const  uiDilatation,
idrs_exception *  pargException 
)

Set the dilatation value (in pixels) that will be used during despeckling.

Parameters
argCDespeckleCDespeckle handle
uiDilatationThe dilatation.
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ CDespeckle_SetSpeckleMaxSize()

void CDespeckle_SetSpeckleMaxSize ( CDespeckle  argCDespeckle,
IDRS_UINT const  uiSpeckleMaxSize,
idrs_exception *  pargException 
)

Set the maximum size (area in pixels) of the connected pixels to be removed.

Remarks
The speckle max size is not used if a callback is registered.
Parameters
argCDespeckleCDespeckle handle
uiSpeckleMaxSizeThe speckle max size.
pargExceptionPointer to exception structure that will be filled if an exception occurs