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:
Collaboration diagram for masc::DualCloudFeature:

Public Types

enum  DualCloudFeatureType { Invalid = 0 , IDIFF }
 
- Public Types inherited from masc::Feature
enum class  Type {
  PointFeature , NeighborhoodFeature , ContextBasedFeature , DualCloudFeature ,
  Invalid
}
 Feature type. More...
 
enum  Stat {
  NO_STAT , MEAN , MODE , MEDIAN ,
  STD , RANGE , SKEW
}
 
enum  Operation {
  NO_OPERATION , MINUS , PLUS , DIVIDE ,
  MULTIPLY
}
 
typedef QSharedPointer< FeatureShared
 Shared type. More...
 
typedef std::vector< SharedSet
 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::ScalarFieldPrepareSF (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...
 
ccPointCloudcloud1
 
ccPointCloudcloud2
 
QString cloud1Label
 
QString cloud2Label
 
Source source
 
Stat stat
 
Operation op
 
bool sf1WasAlreadyExisting
 
bool sf2WasAlreadyExisting
 

Detailed Description

Dual-cloud feature.

Definition at line 32 of file DualCloudFeature.h.

Member Enumeration Documentation

◆ DualCloudFeatureType

Enumerator
Invalid 
IDIFF 

Definition at line 34 of file DualCloudFeature.h.

Constructor & Destructor Documentation

◆ DualCloudFeature()

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

Default constructor.

Definition at line 60 of file DualCloudFeature.h.

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.

Definition at line 26 of file DualCloudFeature.cpp.

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

◆ clone()

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

Clones this feature.

Implements masc::Feature.

Definition at line 64 of file DualCloudFeature.h.

References DualCloudFeature().

◆ FromString()

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

Definition at line 49 of file DualCloudFeature.h.

References FromUpperString().

◆ FromUpperString()

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

Definition at line 52 of file DualCloudFeature.h.

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.

Definition at line 63 of file DualCloudFeature.h.

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.

Definition at line 12 of file DualCloudFeature.cpp.

◆ toString()

QString DualCloudFeature::toString ( ) const
overridevirtual

Returns the formatted description.

Implements masc::Feature.

Definition at line 21 of file DualCloudFeature.cpp.

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

◆ ToString()

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

Definition at line 36 of file DualCloudFeature.h.

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

Definition at line 79 of file DualCloudFeature.h.

Referenced by toString(), and ToString().


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