32 #include <QSharedPointer>
38 typedef QSharedPointer<PointFeature>
Shared;
110 else if (token ==
"X")
112 else if (token ==
"Y")
114 else if (token ==
"Z")
116 else if (token ==
"NBRET")
118 else if (token ==
"RETNB")
120 else if (token ==
"ECHORAT")
122 else if (token ==
"R")
124 else if (token ==
"G")
126 else if (token ==
"B")
128 else if (token ==
"NIR")
130 else if (token ==
"NORMDIP")
132 else if (token ==
"NORMDIPDIR")
134 else if (token ==
"M3C2")
136 else if (token ==
"PCV")
138 else if (token.startsWith(
"SF"))
192 SFCollector* generatedScalarFields =
nullptr)
override;
195 QString&
error)
const override;
196 virtual QString
toString()
const override;
203 double& outputValue)
const;
QSharedPointer< IScalarFieldWrapper > Shared
A 3D cloud and its associated features (color, normals, scalar fields, etc.)
std::vector< PointDescriptor > NeighboursSet
A set of neighbours.
A simple scalar field (to be associated to a point cloud)
static void error(char *msg)
Generic feature descriptor.
QSharedPointer< Feature > Shared
Shared type.
bool computeStat(const cloudViewer::DgmOctree::NeighboursSet &pointsInNeighbourhood, const IScalarFieldWrapper::Shared &sourceField, double &outputValue) const
IScalarFieldWrapper::Shared field1
First cloud 'source' field.
static PointFeatureType FromString(const QString &token)
virtual Type getType() const override
Returns the type (must be reimplemented by child struct)
virtual bool checkValidity(QString corePointRole, QString &error) const override
Checks the feature definition validity.
static QString ToString(PointFeatureType type)
PointFeatureType type
Point feature type.
cloudViewer::ScalarField * statSF1
For scaled features.
cloudViewer::ScalarField * statSF2
~PointFeature() override
Destructor.
virtual bool finish(const CorePoints &corePoints, QString &error) override
Finishes the feature preparation (update the scalar field, etc.)
virtual QString toString() const override
Returns the formatted description.
virtual Feature::Shared clone() const override
Clones this feature.
virtual bool prepare(const CorePoints &corePoints, QString &error, cloudViewer::GenericProgressCallback *progressCb=nullptr, SFCollector *generatedScalarFields=nullptr) override
Prepares the feature (compute the scalar field, etc.)
PointFeature(PointFeatureType p_type)
Default constructor.
static PointFeatureType FromUpperString(const QString &token)
QSharedPointer< PointFeature > Shared
IScalarFieldWrapper::Shared retrieveField(ccPointCloud *cloud, QString &error)
Returns the 'source' field from a given cloud.
IScalarFieldWrapper::Shared field2
Second cloud 'source' field (if any)
int sourceSFIndex
Source scalar field index (if the feature source is 'ScalarField')