 |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
Go to the documentation of this file.
34 typedef QSharedPointer<ContextBasedFeature>
Shared;
57 if (token.startsWith(
"DZ"))
59 else if (token.startsWith(
"DH"))
70 double p_scale = std::numeric_limits<double>::quiet_NaN(),
71 int p_ctxClassLabel = 0)
88 SFCollector* generatedScalarFields =
nullptr)
override;
91 QString& error)
const override;
92 virtual QString
toString()
const override;
98 ScalarType& outputValue)
const;
virtual ccOctree::Shared computeOctree(cloudViewer::GenericProgressCallback *progressCb=nullptr, bool autoAddChild=true)
Computes the cloud octree.
Definition: ecvGenericPointCloud.cpp:124
ContextBasedFeatureType type
Neighborhood feature type.
Definition: ContextBasedFeature.h:104
QSharedPointer< Feature > Shared
Shared type.
Definition: FeaturesInterface.h:49
virtual bool checkValidity(QString corePointRole, QString &error) const override
Checks the feature definition validity.
Definition: ContextBasedFeature.cpp:25
bool oneStep()
Increments total progress value of a single unit.
Definition: NormalizedProgress.cpp:99
3DMASC classifier
Definition: ContextBasedFeature.h:30
Type x
Definition: CVGeom.h:137
virtual unsigned size() const =0
Returns the number of points.
virtual void computeMinAndMax()
Determines the min and max values.
Definition: ScalarField.h:123
@ DH
Definition: ContextBasedFeature.h:36
ScalarType & getValue(std::size_t index)
Definition: ScalarField.h:92
static ContextBasedFeatureType FromString(const QString &token)
Definition: ContextBasedFeature.h:53
Source source
Definition: FeaturesInterface.h:235
void setCurrentOutScalarField(int index)
Sets the OUTPUT scalar field.
Definition: PointCloudTpl.h:421
static bool Print(const char *format,...)
Prints out a formatted message in console.
Definition: CVLog.cpp:113
const CCVector3 * getPoint(unsigned index) const override
Definition: PointCloudTpl.h:143
const CCVector3 * getPoint(unsigned index) const override
Returns the ith point.
Definition: ReferenceCloud.h:79
unsigned size() const override
Definition: PointCloudTpl.h:38
A 3D cloud and its associated features (color, normals, scalar fields, etc.)
Definition: ecvPointCloud.h:146
A simple scalar field (to be associated to a point cloud)
Definition: ScalarField.h:25
virtual void stop()=0
Notifies the fact that the process has ended.
virtual void setMethodTitle(const char *methodTitle)=0
Notifies the algorithm title.
bool computeValue(cloudViewer::DgmOctree::NeighboursSet &pointsInNeighbourhood, const CCVector3 &queryPoint, ScalarType &outputValue) const
Compute the feature value on a set of points.
Definition: ContextBasedFeature.cpp:284
Definition: GenericProgressCallback.h:20
int getScalarFieldIndexByName(const char *name) const
Returns the index of a scalar field represented by its name.
Definition: PointCloudTpl.h:375
ContextBasedFeatureType
Definition: ContextBasedFeature.h:36
static const int MAX_OCTREE_LEVEL
Max octree subdivision level.
Definition: DgmOctree.h:67
QSharedPointer< ccOctree > Shared
Shared pointer.
Definition: ecvOctree.h:32
@ DZ
Definition: ContextBasedFeature.h:36
int ctxClassLabel
Context class (label)
Definition: ContextBasedFeature.h:109
@ CAN_REMOVE
Definition: ScalarFieldCollector.h:44
virtual void setInfo(const char *infoStr)=0
Notifies some information about the ongoing process.
Core points descriptor.
Definition: CorePoints.h:39
static cloudViewer::ScalarField * PrepareSF(ccPointCloud *cloud, const char *resultSFName, SFCollector *generatedScalarFields, SFCollector::Behavior behavior)
Definition: FeaturesInterface.cpp:29
const char * getName() const
Returns scalar field name.
Definition: ScalarField.h:43
bool reserve(unsigned numberOfPoints) override
Reserves memory for all the active features.
Definition: ecvPointCloud.cpp:1452
double scale
Scale (diameter)
Definition: FeaturesInterface.h:230
ContextBasedFeature(ContextBasedFeatureType p_type, int p_kNN=1, double p_scale=std::numeric_limits< double >::quiet_NaN(), int p_ctxClassLabel=0)
Default constructor.
Definition: ContextBasedFeature.h:67
QString name
Definition: FeaturesInterface.h:124
virtual Type getType() const override
Returns the type (must be reimplemented by child struct)
Definition: ContextBasedFeature.h:80
Generic feature descriptor.
Definition: FeaturesInterface.h:46
static bool CheckSFExistence(ccPointCloud *cloud, const char *resultSFName)
Definition: FeaturesInterface.cpp:19
ScalarType getPointScalarValue(unsigned pointIndex) const override
Definition: PointCloudTpl.h:134
Type
Feature type.
Definition: FeaturesInterface.h:56
static ContextBasedFeatureType FromUpperString(const QString &token)
Definition: ContextBasedFeature.h:56
virtual bool prepare(const CorePoints &corePoints, QString &error, cloudViewer::GenericProgressCallback *progressCb=nullptr, SFCollector *generatedScalarFields=nullptr) override
Prepares the feature (compute the scalar field, etc.)
Definition: ContextBasedFeature.cpp:65
Type z
Definition: CVGeom.h:137
@ Invalid
Definition: ContextBasedFeature.h:36
ccPointCloud * cloud1
Definition: FeaturesInterface.h:232
int kNN
Definition: ContextBasedFeature.h:107
virtual const CCVector3 * getPoint(unsigned index) const =0
Returns the ith point.
std::vector< PointDescriptor > NeighboursSet
A set of neighbours.
Definition: DgmOctree.h:133
cloudViewer::ScalarField * sf
The computed scalar.
Definition: ContextBasedFeature.h:111
static bool Warning(const char *format,...)
Prints out a formatted warning message in console.
Definition: CVLog.cpp:133
A very simple point cloud (no point duplication)
Definition: ReferenceCloud.h:29
virtual Feature::Shared clone() const override
Clones this feature.
Definition: ContextBasedFeature.h:81
SF collector.
Definition: ScalarFieldCollector.h:42
constexpr ScalarType NAN_VALUE
NaN as a ScalarType value.
Definition: CVConst.h:76
Type y
Definition: CVGeom.h:137
QString cloud1Label
Definition: FeaturesInterface.h:233
void setValue(std::size_t index, ScalarType value)
Definition: ScalarField.h:96
Context-based feature.
Definition: ContextBasedFeature.h:32
void addPoint(const CCVector3 &P)
Adds a 3D point to the database.
Definition: PointCloudTpl.h:246
static QString ToString(ContextBasedFeatureType type)
Definition: ContextBasedFeature.h:38
Definition: GenericProgressCallback.h:78
Type u[3]
Definition: CVGeom.h:139
QSharedPointer< ContextBasedFeature > Shared
Definition: ContextBasedFeature.h:34
virtual bool checkValidity(QString corePointRole, QString &error) const
Checks the feature definition validity.
Definition: FeaturesInterface.h:179
bool sf1WasAlreadyExisting
Definition: FeaturesInterface.h:240
static Vector3Tpl fromArray(const int a[3])
Constructor from an int array.
Definition: CVGeom.h:268
virtual bool finish(const CorePoints &corePoints, QString &error) override
Finishes the feature preparation (update the scalar field, etc.)
Definition: ContextBasedFeature.cpp:323
virtual QString toString() const override
Returns the formatted description.
Definition: ContextBasedFeature.cpp:350
Structure used during nearest neighbour search.
Definition: DgmOctree.h:101
bool scaled() const
Returns whether the feature has an associated scale.
Definition: FeaturesInterface.h:176