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;
81class QgsFuzzifyRasterLinearMembershipAlgorithm :
public QgsFuzzifyRasterAlgorithmBase
85 QgsFuzzifyRasterLinearMembershipAlgorithm() =
default;
87 QString svgIconPath()
const override {
return QgsApplication::iconPath( QStringLiteral(
"/algorithms/mAlgorithmFuzzifyLinear.svg" ) ); }
88 QString name()
const override;
89 QString displayName()
const override;
90 QStringList tags()
const override;
91 QString shortHelpString()
const override;
92 QgsFuzzifyRasterLinearMembershipAlgorithm *createInstance() const override
SIP_FACTORY;
95 void addAlgorithmParams() override;
100 double mFuzzifyLowBound = 0;
101 double mFuzzifyHighBound = 0;
106class QgsFuzzifyRasterPowerMembershipAlgorithm : public QgsFuzzifyRasterAlgorithmBase
110 QgsFuzzifyRasterPowerMembershipAlgorithm() =
default;
112 QString svgIconPath()
const override {
return QgsApplication::iconPath( QStringLiteral(
"/algorithms/mAlgorithmFuzzifyPower.svg" ) ); }
113 QString name()
const override;
114 QString displayName()
const override;
115 QStringList tags()
const override;
116 QString shortHelpString()
const override;
117 QgsFuzzifyRasterPowerMembershipAlgorithm *createInstance() const override
SIP_FACTORY;
120 void addAlgorithmParams() override;
125 double mFuzzifyLowBound = 0;
126 double mFuzzifyHighBound = 0;
127 double mFuzzifyExponent = 0;
132class QgsFuzzifyRasterLargeMembershipAlgorithm : public QgsFuzzifyRasterAlgorithmBase
136 QgsFuzzifyRasterLargeMembershipAlgorithm() =
default;
138 QString svgIconPath()
const override {
return QgsApplication::iconPath( QStringLiteral(
"/algorithms/mAlgorithmFuzzifyLarge.svg" ) ); }
139 QString name()
const override;
140 QString displayName()
const override;
141 QStringList tags()
const override;
142 QString shortHelpString()
const override;
143 QgsFuzzifyRasterLargeMembershipAlgorithm *createInstance() const override
SIP_FACTORY;
146 void addAlgorithmParams() override;
151 double mFuzzifyMidpoint = 0;
152 double mFuzzifySpread = 0;
157class QgsFuzzifyRasterSmallMembershipAlgorithm : public QgsFuzzifyRasterAlgorithmBase
161 QgsFuzzifyRasterSmallMembershipAlgorithm() =
default;
163 QString svgIconPath()
const override {
return QgsApplication::iconPath( QStringLiteral(
"/algorithms/mAlgorithmFuzzifySmall.svg" ) ); }
164 QString name()
const override;
165 QString displayName()
const override;
166 QStringList tags()
const override;
167 QString shortHelpString()
const override;
168 QgsFuzzifyRasterSmallMembershipAlgorithm *createInstance() const override
SIP_FACTORY;
171 void addAlgorithmParams() override;
176 double mFuzzifyMidpoint = 0;
177 double mFuzzifySpread = 0;
182class QgsFuzzifyRasterGaussianMembershipAlgorithm : public QgsFuzzifyRasterAlgorithmBase
186 QgsFuzzifyRasterGaussianMembershipAlgorithm() =
default;
188 QString svgIconPath()
const override {
return QgsApplication::iconPath( QStringLiteral(
"/algorithms/mAlgorithmFuzzifyGaussian.svg" ) ); }
189 QString name()
const override;
190 QString displayName()
const override;
191 QStringList tags()
const override;
192 QString shortHelpString()
const override;
193 QgsFuzzifyRasterGaussianMembershipAlgorithm *createInstance() const override
SIP_FACTORY;
196 void addAlgorithmParams() override;
201 double mFuzzifyMidpoint = 0;
202 double mFuzzifySpread = 0;
207class QgsFuzzifyRasterNearMembershipAlgorithm : public QgsFuzzifyRasterAlgorithmBase
211 QgsFuzzifyRasterNearMembershipAlgorithm() =
default;
213 QString svgIconPath()
const override {
return QgsApplication::iconPath( QStringLiteral(
"/algorithms/mAlgorithmFuzzifyNear.svg" ) ); }
214 QString name()
const override;
215 QString displayName()
const override;
216 QStringList tags()
const override;
217 QString shortHelpString()
const override;
218 QgsFuzzifyRasterNearMembershipAlgorithm *createInstance() const override
SIP_FACTORY;
221 void addAlgorithmParams() override;
226 double mFuzzifyMidpoint = 0;
227 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 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.