EventThresholdOperation
EventThresholdOperation
#include <analog_event_threshold.hpp>
Inherits from TransformOperation
Public Functions
| Name | |
|---|---|
| virtual std::string | getName() const override |
| virtual std::type_index | getTargetInputTypeIndex() const override |
| virtual bool | canApply(DataTypeVariant const & dataVariant) const override Checks if this operation can be applied to the given data variant. |
| virtual std::unique_ptr< TransformParametersBase > | getDefaultParameters() const override |
| virtual DataTypeVariant | execute(DataTypeVariant const & dataVariant, TransformParametersBase const * transformParameters) override Executes the mask area calculation using data from the variant. |
| virtual DataTypeVariant | execute(DataTypeVariant const & dataVariant, TransformParametersBase const * transformParameters, ProgressCallback progressCallback) override Executes the event thresholding operation with progress reporting. |
Additional inherited members
Public Functions inherited from TransformOperation
| Name | |
|---|---|
| virtual | ~TransformOperation() =default |
Public Functions Documentation
function getName
virtual std::string getName() const overrideReimplements: TransformOperation::getName
function getTargetInputTypeIndex
virtual std::type_index getTargetInputTypeIndex() const overrideReimplements: TransformOperation::getTargetInputTypeIndex
function canApply
virtual bool canApply(
DataTypeVariant const & dataVariant
) const overrideChecks if this operation can be applied to the given data variant.
Parameters:
- dataVariant The variant holding a shared_ptr to the data object.
Return: True if the variant holds a non-null AnalogTimeSeries shared_ptr, false otherwise.
Reimplements: TransformOperation::canApply
function getDefaultParameters
virtual std::unique_ptr< TransformParametersBase > getDefaultParameters() const overrideReimplements: TransformOperation::getDefaultParameters
function execute
virtual DataTypeVariant execute(
DataTypeVariant const & dataVariant,
TransformParametersBase const * transformParameters
) overrideExecutes the mask area calculation using data from the variant.
Parameters:
- dataVariant The variant holding a non-null shared_ptr to the AnalogTimeSeries object.
Return: DataTypeVariant containing a std::shared_ptr
Reimplements: TransformOperation::execute
function execute
virtual DataTypeVariant execute(
DataTypeVariant const & dataVariant,
TransformParametersBase const * transformParameters,
ProgressCallback progressCallback
) overrideExecutes the event thresholding operation with progress reporting.
Parameters:
- dataVariant The variant holding a non-null shared_ptr to the AnalogTimeSeries object.
- transformParameters Parameters for the transformation (must be of type ThresholdParams).
- progressCallback A callback function to report progress (0-100).
- dataVariant A variant holding a std::shared_ptr
. The operation will fail if the variant holds a different type, or if the shared_ptr is null. - transformParameters A pointer to TransformParametersBase, which is expected to be dynamically castable to ThresholdParams. If null or of an incorrect type, default ThresholdParams will be used (if appropriate for the operation) or an error may occur.
- progressCallback An optional function to report progress (0-100). If nullptr, progress is not reported.
Return:
- DataTypeVariant containing a std::shared_ptr
on success, or an empty variant on failure. - A DataTypeVariant containing a std::shared_ptr
with the detected event times on success. Returns an empty DataTypeVariant on failure (e.g., type mismatch, null input data, or if the underlying event_threshold function fails).
Reimplements: TransformOperation::execute
This method retrieves an AnalogTimeSeries from the input dataVariant, applies the event thresholding logic using the provided parameters, and reports progress via the progressCallback.
Updated on 2026-11-13 at 20:25:40 +0000