Leaper WaferScan Toolkit
中文 / English 2.x
Public Member Functions | Properties
ILDataList Interface Reference

This interface defines a data list for metric calculation, filtering and analysis. More...

Inheritance diagram for ILDataList:
ILObject LDataList

Public Member Functions

void Add (double data)
 
void Adds (LArray< double > data)
 
int Count ()
 
void Draw (HDC hdc, LPVChartDrawFlags drawFlags, int xGridStep, int yGridStep)
 
void FromDoubleList (LArray< double > data)
 
void FromIntList (LArray< int > data)
 
ILDataListGaussianFilter (int kSize)
 
ILDataListGradientFilter (LPVEdgeKernel kType, int kSize)
 
double Item (int index)
 
ILDataListMagnitudeFilter (LPVEdgeKernel kType, int kSize)
 
ILDataListMaxFilter (int kSize)
 
LArray< int > MaxLocalExtrema (double threshold, int num, LPVFindBy findBy, BOOL onePeakMode)
 
ILDataListMeanFilter (int kSize)
 
ILDataListMedianFilter (int kSize)
 
ILDataListMinFilter (int kSize)
 
LArray< int > MinLocalExtrema (double threshold, int num, LPVFindBy findBy, BOOL onePeakMode)
 
LArray< double > ToDoubleList ()
 
LArray< int > ToIntList ()
 
- Public Member Functions inherited from ILObject
ILObjectCopy ()
 
LPVErrorCode Load (LString filename)
 
void Reset ()
 
LPVErrorCode Save (LString filename)
 
BOOL Valid ()
 

Properties

int MaxCount [get, set]
 The maximum number of the list.
By default, it's 0, means no limitation.
If more than the setting number of data is pushed into the list, the earlier ones will be popped.
 
int MaxIndex [get]
 The index of the maximum element.
 
double Metric (LPVAggregation aggType) [get]
 The aggregation metric of the data list, such as mean, sum, minimum, etc. More...
 
int MinIndex [get]
 The index of the minimum element.
 

Detailed Description

This interface defines a data list for metric calculation, filtering and analysis.

To use this interface, you should create a LDataList object.

Example Code

Member Function Documentation

◆ Add()

void Add ( double  data)

Push the supplied data to the end of the list.

Parameters
[in]dataThe input data.

◆ Adds()

void Adds ( LArray< double >  data)

Push the collection of data to the end of the list.

Parameters
[in]dataThe input data, should be a collection of double.

◆ Count()

int Count ( )

Get count of the data in the list.

◆ Draw()

void Draw ( HDC  hdc,
LPVChartDrawFlags  drawFlags,
int  xGridStep,
int  yGridStep 
)

Draw the data vector as a chart onto provide device context, using the index as x axis and the value as y axis.

Parameters
[in]hdcHandle to the device context of the destination window or bitmap.
[in]drawFlagsFlags to control which part of a data chart should be drawn, see LPVChartDrawFlags for usage.
[in]xGridStepSpecify the step of label on x axis, 0 means we'll determine it on the fly according to the score data.
[in]yGridStepSpecify the step of label on y axis, 0 means we'll determine it on the fly according to the score data. This function is currently not available on Linux / MacOS platform.

◆ FromDoubleList()

void FromDoubleList ( LArray< double >  data)

Convert the data from a list of double values.

See also
ToDoubleList().

◆ FromIntList()

void FromIntList ( LArray< int >  data)

Convert the data from a list of integer values.

See also
ToIntList().

◆ GaussianFilter()

ILDataList* GaussianFilter ( int  kSize)

Blurs the data list using a Gaussian filter. The definition of Gaussian kernel is the same as the Image Gaussian Filter

Parameters
[in]kSizeThe kernel size used in the filter, should be an odd number, say, 1, 3, 5, 7, etc. By default it's 3. Large kernel size results usually in stronger filtering effect, but also slower.
Return values
resultReturn the filtered data list

◆ GradientFilter()

ILDataList* GradientFilter ( LPVEdgeKernel  kType,
int  kSize 
)

The "edges" are represented by bigger absolute values. If a kernel size is set to be 1, the kernel degenerated to be \( (-1, 1) \) no mater what kernel type it is.

Parameters
[in]kTypeThe edging kernel type
[in]kSizeThe kernel size used in the filter, should be an odd number, say, 1, 3, 5, 7, etc. By default it's 3. Large kernel size results usually in stronger filtering effect, but also slower.
Return values
resultReturn the filtered data list

◆ Item()

double Item ( int  index)

Fetch the data with the given index.

Parameters
[in]indexThe input index, it should be a 0-based number smaller than total count.
Return values
valueReturn the data of given index.

◆ MagnitudeFilter()

ILDataList* MagnitudeFilter ( LPVEdgeKernel  kType,
int  kSize 
)

Similar as GradientFilter(), it outputs the magnitude of the gradients, aka. the absolute value of the gradient filter.

Parameters
[in]kTypeThe edging kernel type
[in]kSizeThe kernel size used in the filter, should be an odd number, say, 1, 3, 5, 7, etc. By default it's 3. Large kernel size results usually in stronger filtering effect, but also slower.
Return values
resultReturn the filtered data list

◆ MaxFilter()

ILDataList* MaxFilter ( int  kSize)

Each output data represents the maximum of the values in the kernel neighborhood, as:

\[ X{i}' = \max_{j=0}^{kSize} X{i+j-kSize/2} \]

Parameters
[in]kSizeThe kernel size used in the filter, should be an odd number, say, 1, 3, 5, 7, etc. By default it's 3. Large kernel size results usually in stronger filtering effect, but also slower.
Return values
resultReturn the filtered data list

◆ MaxLocalExtrema()

LArray<int> MaxLocalExtrema ( double  threshold,
int  num,
LPVFindBy  findBy,
BOOL  onePeakMode 
)

Find the local maximum extrema values in the data list.

Parameters
[in]thresholdThe threshold value used to filter noise data, the values smaller than the threshold is not considered during calculation. By default, it's the minimum double value, means no filter is needed.
[in]numThe expected number of local extrema values. If there are more extrema points, the top ones are picked according to the specified findBy strategy. By default, it's 0 means find all.
[in]findByThe searching strategy.
[in]onePeakModeTurn it on to enable to one-peak mode, then if there are multiple extrema values in one thresholded region, only the largest one is returned. By default, it's off.
Return values
indexesReturn the extrema indexes ascendingly.
See also
MinLocalExtrema()

◆ MeanFilter()

ILDataList* MeanFilter ( int  kSize)

Each output data represents the mean of the values in the kernel neighborhood, as:

\[ X{i}' = \sum_{j=0}^{kSize} X{i+j-kSize/2} \]

Parameters
[in]kSizeThe kernel size used in the filter, should be an odd number, say, 1, 3, 5, 7, etc. By default it's 3. Large kernel size results usually in stronger filtering effect, but also slower.
Return values
resultReturn the filtered data list

◆ MedianFilter()

ILDataList* MedianFilter ( int  kSize)

Each output data represents the median of the values in the kernel neighborhood.

Parameters
[in]kSizeThe kernel size used in the filter, should be an odd number, say, 1, 3, 5, 7, etc. By default it's 3. Large kernel size results usually in stronger filtering effect, but also slower.
Return values
resultReturn the filtered data list

◆ MinFilter()

ILDataList* MinFilter ( int  kSize)

Each output data represents the minimum of the values in the kernel neighborhood, as:

\[ X{i}' = \min_{j=0}^{kSize} X{i+j-kSize/2} \]

Parameters
[in]kSizeThe kernel size used in the filter, should be an odd number, say, 1, 3, 5, 7, etc. By default it's 3. Large kernel size results usually in stronger filtering effect, but also slower.
Return values
resultReturn the filtered data list

◆ MinLocalExtrema()

LArray<int> MinLocalExtrema ( double  threshold,
int  num,
LPVFindBy  findBy,
BOOL  onePeakMode 
)

Find the local minimum extrema values in the data list.

Parameters
[in]thresholdThe threshold value used to filter noise data, the values bigger than the threshold is not considered during calculation. By default, it's the maximum double value, means no filter is needed.
[in]numThe expected number of local extrema values. If there are more extrema points, the top ones are picked according to the specified findBy strategy. By default, it's 0 means find all.
[in]findByThe searching strategy.
[in]onePeakModeTurn it on to enable to one-peak mode, then if there are multiple extrema values in one thresholded region, only the smallest one is returned. By default, it's off.
Return values
indexesReturn the extrema indexes ascendingly.
See also
MaxLocalExtrema()

◆ ToDoubleList()

LArray<double> ToDoubleList ( )

Convert the data to a list of double values.

See also
FromDoubleList().

◆ ToIntList()

LArray<int> ToIntList ( )

Convert the data to a list of integer values.

See also
FromIntList().

Property Documentation

◆ Metric

double Metric( LPVAggregation aggType)
get

The aggregation metric of the data list, such as mean, sum, minimum, etc.

Parameters
[in]aggTypeThe aggregation type
Return values
valReturn the metric value
See also
MinIndex, MaxIndex