18#ifndef QGSFUZZIFYRASTERALGORITHM_H
19#define QGSFUZZIFYRASTERALGORITHM_H
35 QString
group()
const final;
37 void initAlgorithm(
const QVariantMap &configuration = QVariantMap() )
final;
44 virtual void addAlgorithmParams() = 0;
65 std::unique_ptr<QgsRasterInterface> mInterface;
70 int mNbCellsXProvider = 0;
71 int mNbCellsYProvider = 0;
74 const double mNoDataValue = -9999;
78class QgsFuzzifyRasterLinearMembershipAlgorithm :
public QgsFuzzifyRasterAlgorithmBase
81 QgsFuzzifyRasterLinearMembershipAlgorithm() =
default;
83 QString svgIconPath()
const override {
return QgsApplication::iconPath( QStringLiteral(
"/algorithms/mAlgorithmFuzzifyLinear.svg" ) ); }
84 QString name()
const override;
85 QString displayName()
const override;
86 QStringList tags()
const override;
87 QString shortHelpString()
const override;
88 QgsFuzzifyRasterLinearMembershipAlgorithm *createInstance() const override
SIP_FACTORY;
91 void addAlgorithmParams() override;
96 double mFuzzifyLowBound = 0;
97 double mFuzzifyHighBound = 0;
101class QgsFuzzifyRasterPowerMembershipAlgorithm : public QgsFuzzifyRasterAlgorithmBase
104 QgsFuzzifyRasterPowerMembershipAlgorithm() =
default;
106 QString svgIconPath()
const override {
return QgsApplication::iconPath( QStringLiteral(
"/algorithms/mAlgorithmFuzzifyPower.svg" ) ); }
107 QString name()
const override;
108 QString displayName()
const override;
109 QStringList tags()
const override;
110 QString shortHelpString()
const override;
111 QgsFuzzifyRasterPowerMembershipAlgorithm *createInstance() const override
SIP_FACTORY;
114 void addAlgorithmParams() override;
119 double mFuzzifyLowBound = 0;
120 double mFuzzifyHighBound = 0;
121 double mFuzzifyExponent = 0;
125class QgsFuzzifyRasterLargeMembershipAlgorithm : public QgsFuzzifyRasterAlgorithmBase
128 QgsFuzzifyRasterLargeMembershipAlgorithm() =
default;
130 QString svgIconPath()
const override {
return QgsApplication::iconPath( QStringLiteral(
"/algorithms/mAlgorithmFuzzifyLarge.svg" ) ); }
131 QString name()
const override;
132 QString displayName()
const override;
133 QStringList tags()
const override;
134 QString shortHelpString()
const override;
135 QgsFuzzifyRasterLargeMembershipAlgorithm *createInstance() const override
SIP_FACTORY;
138 void addAlgorithmParams() override;
143 double mFuzzifyMidpoint = 0;
144 double mFuzzifySpread = 0;
148class QgsFuzzifyRasterSmallMembershipAlgorithm : public QgsFuzzifyRasterAlgorithmBase
151 QgsFuzzifyRasterSmallMembershipAlgorithm() =
default;
153 QString svgIconPath()
const override {
return QgsApplication::iconPath( QStringLiteral(
"/algorithms/mAlgorithmFuzzifySmall.svg" ) ); }
154 QString name()
const override;
155 QString displayName()
const override;
156 QStringList tags()
const override;
157 QString shortHelpString()
const override;
158 QgsFuzzifyRasterSmallMembershipAlgorithm *createInstance() const override
SIP_FACTORY;
161 void addAlgorithmParams() override;
166 double mFuzzifyMidpoint = 0;
167 double mFuzzifySpread = 0;
171class QgsFuzzifyRasterGaussianMembershipAlgorithm : public QgsFuzzifyRasterAlgorithmBase
174 QgsFuzzifyRasterGaussianMembershipAlgorithm() =
default;
176 QString svgIconPath()
const override {
return QgsApplication::iconPath( QStringLiteral(
"/algorithms/mAlgorithmFuzzifyGaussian.svg" ) ); }
177 QString name()
const override;
178 QString displayName()
const override;
179 QStringList tags()
const override;
180 QString shortHelpString()
const override;
181 QgsFuzzifyRasterGaussianMembershipAlgorithm *createInstance() const override
SIP_FACTORY;
184 void addAlgorithmParams() override;
189 double mFuzzifyMidpoint = 0;
190 double mFuzzifySpread = 0;
194class QgsFuzzifyRasterNearMembershipAlgorithm : public QgsFuzzifyRasterAlgorithmBase
197 QgsFuzzifyRasterNearMembershipAlgorithm() =
default;
199 QString svgIconPath()
const override {
return QgsApplication::iconPath( QStringLiteral(
"/algorithms/mAlgorithmFuzzifyNear.svg" ) ); }
200 QString name()
const override;
201 QString displayName()
const override;
202 QStringList tags()
const override;
203 QString shortHelpString()
const override;
204 QgsFuzzifyRasterNearMembershipAlgorithm *createInstance() const override
SIP_FACTORY;
207 void addAlgorithmParams() override;
212 double mFuzzifyMidpoint = 0;
213 double mFuzzifySpread = 0;
DataType
Raster data types.
@ Float32
Thirty two bit floating point (float)
static QIcon getThemeIcon(const QString &name, const QColor &fillColor=QColor(), const QColor &strokeColor=QColor())
Helper to get a theme icon.
static QString iconPath(const QString &iconFile)
Returns path to the desired icon file.
This class represents a coordinate reference system (CRS).
Abstract base class for processing algorithms.
virtual QString group() const
Returns the name of the group this algorithm belongs to.
virtual bool prepareAlgorithm(const QVariantMap ¶meters, QgsProcessingContext &context, QgsProcessingFeedback *feedback)
Prepares the algorithm to run using the specified parameters.
virtual QString groupId() const
Returns the unique ID of the group this algorithm belongs to.
virtual QVariantMap processAlgorithm(const QVariantMap ¶meters, QgsProcessingContext &context, QgsProcessingFeedback *feedback)=0
Runs the algorithm using the specified parameters.
virtual void initAlgorithm(const QVariantMap &configuration=QVariantMap())=0
Initializes the algorithm using the specified configuration.
Contains information about the context in which a processing algorithm is executed.
Base class for providing feedback from a processing algorithm.
Base class for raster data providers.
Represents a raster layer.
A rectangle specified with double values.