Skip to main content

LineResampleOperation

LineResampleOperation

#include <line_resample.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
virtual std::unique_ptr< TransformParametersBase > getDefaultParameters() const override
virtual DataTypeVariant execute(DataTypeVariant const & dataVariant, TransformParametersBase const * transformParameters) override
virtual DataTypeVariant execute(DataTypeVariant const & dataVariant, TransformParametersBase const * transformParameters, ProgressCallback progressCallback) override
Executes the line resampling 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 override

Reimplements: TransformOperation::getName

function getTargetInputTypeIndex

virtual std::type_index getTargetInputTypeIndex() const override

Reimplements: TransformOperation::getTargetInputTypeIndex

function canApply

virtual bool canApply(
    DataTypeVariant const & dataVariant
) const override

Reimplements: TransformOperation::canApply

function getDefaultParameters

virtual std::unique_ptr< TransformParametersBase > getDefaultParameters() const override

Reimplements: TransformOperation::getDefaultParameters

function execute

virtual DataTypeVariant execute(
    DataTypeVariant const & dataVariant,
    TransformParametersBase const * transformParameters
) override

Reimplements: TransformOperation::execute

function execute

virtual DataTypeVariant execute(
    DataTypeVariant const & dataVariant,
    TransformParametersBase const * transformParameters,
    ProgressCallback progressCallback
) override

Executes the line resampling operation with progress reporting.

Parameters:

  • 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 LineResampleParameters. If null or of an incorrect type, default LineResampleParameters will be used.
  • progressCallback An optional function to report progress (0-100). If nullptr, progress is not reported.

Return: A DataTypeVariant containing a std::shared_ptr with the resampled lines on success. Returns an empty DataTypeVariant on failure (e.g., type mismatch, null input data, or if the underlying line_resample function fails).

Reimplements: TransformOperation::execute

This method retrieves a LineData from the input dataVariant, applies the line resampling logic using the provided parameters, and reports progress via the progressCallback.


Updated on 2026-11-13 at 20:25:40 +0000