This interface defines a data list for metric calculation, filtering and analysis. More...
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) |
ILDataList * | GaussianFilter (int kSize) |
ILDataList * | GradientFilter (LPVEdgeKernel kType, int kSize) |
double | Item (int index) |
ILDataList * | MagnitudeFilter (LPVEdgeKernel kType, int kSize) |
ILDataList * | MaxFilter (int kSize) |
LArray< int > | MaxLocalExtrema (double threshold, int num, LPVFindBy findBy, BOOL onePeakMode) |
ILDataList * | MeanFilter (int kSize) |
ILDataList * | MedianFilter (int kSize) |
ILDataList * | MinFilter (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 | |
ILObject * | Copy () |
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. | |
This interface defines a data list for metric calculation, filtering and analysis.
To use this interface, you should create a LDataList object.
void Add | ( | double | data | ) |
Push the supplied data to the end of the list.
[in] | data | The input data. |
void Adds | ( | LArray< double > | data | ) |
Push the collection of data to the end of the list.
[in] | data | The input data, should be a collection of double. |
int Count | ( | ) |
Get count of the data in the list.
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.
[in] | hdc | Handle to the device context of the destination window or bitmap. |
[in] | drawFlags | Flags to control which part of a data chart should be drawn, see LPVChartDrawFlags for usage. |
[in] | xGridStep | Specify the step of label on x axis, 0 means we'll determine it on the fly according to the score data. |
[in] | yGridStep | Specify 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. |
void FromDoubleList | ( | LArray< double > | data | ) |
Convert the data from a list of double values.
void FromIntList | ( | LArray< int > | data | ) |
Convert the data from a list of integer values.
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
[in] | kSize | The 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. |
result | Return the filtered data list |
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.
[in] | kType | The edging kernel type |
[in] | kSize | The 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. |
result | Return the filtered data list |
double Item | ( | int | index | ) |
Fetch the data with the given index.
[in] | index | The input index, it should be a 0-based number smaller than total count. |
value | Return the data of given index. |
ILDataList* MagnitudeFilter | ( | LPVEdgeKernel | kType, |
int | kSize | ||
) |
Similar as GradientFilter(), it outputs the magnitude of the gradients, aka. the absolute value of the gradient filter.
[in] | kType | The edging kernel type |
[in] | kSize | The 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. |
result | Return the filtered data list |
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} \]
[in] | kSize | The 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. |
result | Return the filtered data list |
Find the local maximum extrema values in the data list.
[in] | threshold | The 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] | num | The 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] | findBy | The searching strategy. |
[in] | onePeakMode | Turn 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. |
indexes | Return the extrema indexes ascendingly. |
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} \]
[in] | kSize | The 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. |
result | Return the filtered data list |
ILDataList* MedianFilter | ( | int | kSize | ) |
Each output data represents the median of the values in the kernel neighborhood.
[in] | kSize | The 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. |
result | Return the filtered data list |
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} \]
[in] | kSize | The 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. |
result | Return the filtered data list |
Find the local minimum extrema values in the data list.
[in] | threshold | The 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] | num | The 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] | findBy | The searching strategy. |
[in] | onePeakMode | Turn 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. |
indexes | Return the extrema indexes ascendingly. |
LArray<double> ToDoubleList | ( | ) |
Convert the data to a list of double values.
LArray<int> ToIntList | ( | ) |
Convert the data to a list of integer values.
|
get |