ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
masc::DualCloudFeature Struct Reference

Dual-cloud feature. More...

#include <DualCloudFeature.h>

Inheritance diagram for masc::DualCloudFeature:
[legend]
Collaboration diagram for masc::DualCloudFeature:
[legend]

Public Types

enum  DualCloudFeatureType { Invalid = 0, IDIFF }
 
- Public Types inherited from masc::Feature
enum  Type {
  Type::PointFeature, Type::NeighborhoodFeature, Type::ContextBasedFeature, Type::DualCloudFeature,
  Type::Invalid
}
 Feature type. More...
 
enum  Stat {
  NO_STAT, MEAN, MODE, MEDIAN,
  STD, RANGE, SKEW
}
 
enum  Operation {
  NO_OPERATION, MINUS, PLUS, DIVIDE,
  MULTIPLY
}
 
typedef QSharedPointer< Feature > Shared
 Shared type. More...
 
typedef std::vector< Shared > Set
 Set of features. More...
 

Public Member Functions

 DualCloudFeature (DualCloudFeatureType p_type)
 Default constructor. More...
 
virtual Type getType () const override
 Returns the type (must be reimplemented by child struct) More...
 
virtual Feature::Shared clone () const override
 Clones this feature. More...
 
virtual bool prepare (const CorePoints &corePoints, QString &error, cloudViewer::GenericProgressCallback *progressCb=nullptr, SFCollector *generatedScalarFields=nullptr) override
 Prepares the feature (compute the scalar field, etc.) More...
 
virtual bool checkValidity (QString corePointRole, QString &error) const override
 Checks the feature definition validity. More...
 
virtual QString toString () const override
 Returns the formatted description. More...
 
- Public Member Functions inherited from masc::Feature
 Feature (double p_scale=std::numeric_limits< double >::quiet_NaN(), Source::Type p_source=Source::ScalarField, QString p_sourceName=QString())
 Default constructor. More...
 
virtual ~Feature ()
 Destructor. More...
 
virtual bool finish (const CorePoints &corePoints, QString &error)
 Finishes the feature preparation (update the scalar field, etc.) More...
 
bool scaled () const
 Returns whether the feature has an associated scale. More...
 

Static Public Member Functions

static QString ToString (DualCloudFeatureType type)
 
static DualCloudFeatureType FromString (const QString &token)
 
static DualCloudFeatureType FromUpperString (const QString &token)
 
- Static Public Member Functions inherited from masc::Feature
static QString StatToString (Stat stat)
 
static QString OpToString (Operation op)
 
static bool ExtractSources (const Set &features, Source::Set &sources)
 Extracts the set of 'sources' from a set of features. More...
 
static bool SaveSources (const Source::Set &sources, QString filename)
 Saves a set of 'sources' to a file. More...
 
static bool LoadSources (Source::Set &sources, QString filename)
 Loads a set of 'sources' from a file. More...
 
static bool CheckSFExistence (ccPointCloud *cloud, const char *resultSFName)
 
static cloudViewer::ScalarField * PrepareSF (ccPointCloud *cloud, const char *resultSFName, SFCollector *generatedScalarFields, SFCollector::Behavior behavior)
 
static ScalarType PerformMathOp (double s1, double s2, Operation op)
 Performs a mathematical operation between two scalars. More...
 
static bool PerformMathOp (cloudViewer::ScalarField *sf1, const cloudViewer::ScalarField *sf2, Operation op)
 
static bool PerformMathOp (const IScalarFieldWrapper &sf1, const IScalarFieldWrapper &sf2, Operation op, cloudViewer::ScalarField *outSF)
 

Public Attributes

DualCloudFeatureType type
 Dual-cloud feature type. More...
 
- Public Attributes inherited from masc::Feature
double scale
 Scale (diameter) More...
 
ccPointCloud * cloud1
 
ccPointCloud * cloud2
 
QString cloud1Label
 
QString cloud2Label
 
Source source
 
Stat stat
 
Operation op
 
bool sf1WasAlreadyExisting
 
bool sf2WasAlreadyExisting
 

Detailed Description

Dual-cloud feature.

Member Enumeration Documentation

◆ DualCloudFeatureType

Enumerator
Invalid 
IDIFF 

Constructor & Destructor Documentation

◆ DualCloudFeature()

masc::DualCloudFeature::DualCloudFeature ( DualCloudFeatureType  p_type)
inline

Default constructor.

Referenced by clone().

Member Function Documentation

◆ checkValidity()

bool DualCloudFeature::checkValidity ( QString  corePointRole,
QString &  error 
) const
overridevirtual

Checks the feature definition validity.

Reimplemented from masc::Feature.

References masc::Feature::checkValidity(), masc::Feature::cloud1, masc::Feature::cloud2, masc::Feature::NO_OPERATION, and masc::Feature::op.

◆ clone()

virtual Feature::Shared masc::DualCloudFeature::clone ( ) const
inlineoverridevirtual

Clones this feature.

Implements masc::Feature.

References DualCloudFeature().

◆ FromString()

static DualCloudFeatureType masc::DualCloudFeature::FromString ( const QString &  token)
inlinestatic

References FromUpperString().

◆ FromUpperString()

static DualCloudFeatureType masc::DualCloudFeature::FromUpperString ( const QString &  token)
inlinestatic

References IDIFF, and Invalid.

Referenced by CreateFeaturesFromCommand(), and FromString().

◆ getType()

virtual Type masc::DualCloudFeature::getType ( ) const
inlineoverridevirtual

Returns the type (must be reimplemented by child struct)

Implements masc::Feature.

References masc::Feature::DualCloudFeature.

◆ prepare()

bool DualCloudFeature::prepare ( const CorePoints &  corePoints,
QString &  error,
cloudViewer::GenericProgressCallback *  progressCb = nullptr,
SFCollector *  generatedScalarFields = nullptr 
)
overridevirtual

Prepares the feature (compute the scalar field, etc.)

Implements masc::Feature.

◆ toString()

QString DualCloudFeature::toString ( ) const
overridevirtual

Returns the formatted description.

Implements masc::Feature.

References masc::Feature::scale, ToString(), and type.

◆ ToString()

static QString masc::DualCloudFeature::ToString ( DualCloudFeatureType  type)
inlinestatic

References IDIFF, Invalid, and type.

Referenced by toString().

Member Data Documentation

◆ type

DualCloudFeatureType masc::DualCloudFeature::type

Dual-cloud feature type.

Warning
different from the feature type

Referenced by ToString(), and toString().


The documentation for this struct was generated from the following files: