18#ifndef QGSFUZZIFYRASTERALGORITHM_H
19#define QGSFUZZIFYRASTERALGORITHM_H
35 QString
group()
const final;
37 void initAlgorithm(
const QVariantMap &configuration = QVariantMap() )
final;
45 virtual void addAlgorithmParams() = 0;
66 std::unique_ptr< QgsRasterInterface > mInterface;
71 int mNbCellsXProvider = 0;
72 int mNbCellsYProvider = 0;
75 const double mNoDataValue = -9999;
82class QgsFuzzifyRasterLinearMembershipAlgorithm :
public QgsFuzzifyRasterAlgorithmBase
86 QgsFuzzifyRasterLinearMembershipAlgorithm() =
default;
88 QString svgIconPath()
const override {
return QgsApplication::iconPath( QStringLiteral(
"/algorithms/mAlgorithmFuzzifyLinear.svg" ) ); }
89 QString name()
const override;
90 QString displayName()
const override;
91 QStringList tags()
const override;
92 QString shortHelpString()
const override;
93 QgsFuzzifyRasterLinearMembershipAlgorithm *createInstance() const override
SIP_FACTORY;
96 void addAlgorithmParams() override;
101 double mFuzzifyLowBound;
102 double mFuzzifyHighBound;
107class QgsFuzzifyRasterPowerMembershipAlgorithm : public QgsFuzzifyRasterAlgorithmBase
111 QgsFuzzifyRasterPowerMembershipAlgorithm() =
default;
113 QString svgIconPath()
const override {
return QgsApplication::iconPath( QStringLiteral(
"/algorithms/mAlgorithmFuzzifyPower.svg" ) ); }
114 QString name()
const override;
115 QString displayName()
const override;
116 QStringList tags()
const override;
117 QString shortHelpString()
const override;
118 QgsFuzzifyRasterPowerMembershipAlgorithm *createInstance() const override
SIP_FACTORY;
121 void addAlgorithmParams() override;
126 double mFuzzifyLowBound;
127 double mFuzzifyHighBound;
128 double mFuzzifyExponent;
133class QgsFuzzifyRasterLargeMembershipAlgorithm : public QgsFuzzifyRasterAlgorithmBase
137 QgsFuzzifyRasterLargeMembershipAlgorithm() =
default;
139 QString svgIconPath()
const override {
return QgsApplication::iconPath( QStringLiteral(
"/algorithms/mAlgorithmFuzzifyLarge.svg" ) ); }
140 QString name()
const override;
141 QString displayName()
const override;
142 QStringList tags()
const override;
143 QString shortHelpString()
const override;
144 QgsFuzzifyRasterLargeMembershipAlgorithm *createInstance() const override
SIP_FACTORY;
147 void addAlgorithmParams() override;
152 double mFuzzifyMidpoint;
153 double mFuzzifySpread;
158class QgsFuzzifyRasterSmallMembershipAlgorithm : public QgsFuzzifyRasterAlgorithmBase
162 QgsFuzzifyRasterSmallMembershipAlgorithm() =
default;
164 QString svgIconPath()
const override {
return QgsApplication::iconPath( QStringLiteral(
"/algorithms/mAlgorithmFuzzifySmall.svg" ) ); }
165 QString name()
const override;
166 QString displayName()
const override;
167 QStringList tags()
const override;
168 QString shortHelpString()
const override;
169 QgsFuzzifyRasterSmallMembershipAlgorithm *createInstance() const override
SIP_FACTORY;
172 void addAlgorithmParams() override;
177 double mFuzzifyMidpoint;
178 double mFuzzifySpread;
183class QgsFuzzifyRasterGaussianMembershipAlgorithm : public QgsFuzzifyRasterAlgorithmBase
187 QgsFuzzifyRasterGaussianMembershipAlgorithm() =
default;
189 QString svgIconPath()
const override {
return QgsApplication::iconPath( QStringLiteral(
"/algorithms/mAlgorithmFuzzifyGaussian.svg" ) ); }
190 QString name()
const override;
191 QString displayName()
const override;
192 QStringList tags()
const override;
193 QString shortHelpString()
const override;
194 QgsFuzzifyRasterGaussianMembershipAlgorithm *createInstance() const override
SIP_FACTORY;
197 void addAlgorithmParams() override;
202 double mFuzzifyMidpoint;
203 double mFuzzifySpread;
208class QgsFuzzifyRasterNearMembershipAlgorithm : public QgsFuzzifyRasterAlgorithmBase
212 QgsFuzzifyRasterNearMembershipAlgorithm() =
default;
214 QString svgIconPath()
const override {
return QgsApplication::iconPath( QStringLiteral(
"/algorithms/mAlgorithmFuzzifyNear.svg" ) ); }
215 QString name()
const override;
216 QString displayName()
const override;
217 QStringList tags()
const override;
218 QString shortHelpString()
const override;
219 QgsFuzzifyRasterNearMembershipAlgorithm *createInstance() const override
SIP_FACTORY;
222 void addAlgorithmParams() override;
227 double mFuzzifyMidpoint;
228 double mFuzzifySpread;
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 QString groupId() const
Returns the unique ID of the group this algorithm belongs to.
virtual QVariantMap processAlgorithm(const QVariantMap ¶meters, QgsProcessingContext &context, QgsProcessingFeedback *feedback) SIP_THROW(QgsProcessingException)=0
Runs the algorithm using the specified parameters.
virtual bool prepareAlgorithm(const QVariantMap ¶meters, QgsProcessingContext &context, QgsProcessingFeedback *feedback) SIP_THROW(QgsProcessingException)
Prepares the algorithm to run 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.