IUF-SDK-3
Interventional Ultrasound Library
iufTGC.h File Reference

Go to the source code of this file.

Macros

#define IUTGC_INVALID   (iutgc_t) NULL
 

Typedefs

typedef IufTGCiutgc_t
 

Functions

iutgc_t iufTGCCreate (int numTGCValues)
 Create an empty TGC function of numTGC values. More...
 
int iufTGCDelete (iutgc_t tgc)
 Frees the memory of the TGC object. More...
 
int iufTGCCompare (iutgc_t reference, iutgc_t actual)
 Checks if two TGCs are equal. More...
 
int iufTGCGetNumValues (iutgc_t tgc)
 Get the number of [time,gain] pairs that the TGC function has. More...
 
float iufTGCGetTime (iutgc_t tgc, int index)
 Get the time value of a point in the TGC function at index. More...
 
float iufTGCGetGain (iutgc_t tgc, int index)
 Get the gain value of a point in the TGC function at index. More...
 
int iufTGCSet (iutgc_t tgc, int index, float time, float gain)
 Set a [time,gain] pair of the TGC function at index. More...
 

Macro Definition Documentation

◆ IUTGC_INVALID

#define IUTGC_INVALID   (iutgc_t) NULL

Typedef Documentation

◆ iutgc_t

typedef IufTGC* iutgc_t

Time Gain Control defines a function of the receiver gain over time. The function is described by numTGCValues of [time,gain] pairs. The time values should be provided and kept in a strictly ascending order.

Function Documentation

◆ iufTGCCompare()

int iufTGCCompare ( iutgc_t  reference,
iutgc_t  actual 
)

Checks if two TGCs are equal.

Returns
Returns IUF_TRUE if the TGCs are equal and IUF_FALSE otherwise
Parameters
referenceThe TGC object to compare to
actualThe TGC object to compare with

◆ iufTGCCreate()

iutgc_t iufTGCCreate ( int  numTGCValues)

Create an empty TGC function of numTGC values.

Returns
Returns the created TGC object or NULL in case of a failure
Parameters
numTGCValuesThe number of [time,gain] pairs to allocate

◆ iufTGCDelete()

int iufTGCDelete ( iutgc_t  tgc)

Frees the memory of the TGC object.

Returns
Returns the created TGC object or NULL in case of a failure
Parameters
tgcThe object to delete

◆ iufTGCGetGain()

float iufTGCGetGain ( iutgc_t  tgc,
int  index 
)

Get the gain value of a point in the TGC function at index.

Returns
The gain value
Parameters
tgcThe TGC object of interest
indexThe index of the TGC function

◆ iufTGCGetNumValues()

int iufTGCGetNumValues ( iutgc_t  tgc)

Get the number of [time,gain] pairs that the TGC function has.

Returns
Returns the number of [time,gain] pairs
Parameters
tgcThe TGC object of interest

◆ iufTGCGetTime()

float iufTGCGetTime ( iutgc_t  tgc,
int  index 
)

Get the time value of a point in the TGC function at index.

Returns
The time value
Parameters
tgcTHe TGC object of interest
indexThe index of the TGC function

◆ iufTGCSet()

int iufTGCSet ( iutgc_t  tgc,
int  index,
float  time,
float  gain 
)

Set a [time,gain] pair of the TGC function at index.

Returns
Returns IUF_E_OK in case of success or IUF_ERR_VALUE in case of an error
Parameters
tgcThe TGC function of interest
indexThe index of the TGC function to replace the time, gain pair
timeThe time value to set
gainThe gain value to set