qCC version 2.13.alpha (Qt) - 31 May 2022
Main CloudCompare application (GUI & command line)
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
ccScalarFieldArithmeticsDlg Class Reference

Dialog to choose 2 scalar fields (SF) and one operation for arithmetics processing. More...

#include <ccScalarFieldArithmeticsDlg.h>

Inheritance diagram for ccScalarFieldArithmeticsDlg:
Inheritance graph
[legend]
Collaboration diagram for ccScalarFieldArithmeticsDlg:
Collaboration graph
[legend]

Classes

struct  SF2
 Secondary SF descriptor. More...
 

Public Types

enum  Operation {
  PLUS = 0 , MINUS = 1 , MULTIPLY = 2 , DIVIDE = 3 ,
  SQRT = 4 , POW2 = 5 , POW3 = 6 , EXP = 7 ,
  LOG = 8 , LOG10 = 9 , COS = 10 , SIN = 11 ,
  TAN = 12 , ACOS = 13 , ASIN = 14 , ATAN = 15 ,
  INT = 16 , INVERSE = 17 , INVALID = 255
}
 Arithmetic operations.
 

Public Member Functions

 ccScalarFieldArithmeticsDlg (ccPointCloud *cloud, QWidget *parent=nullptr)
 Default constructor.
 
Operation getOperation () const
 Returns selected operation.
 
bool apply (ccPointCloud *cloud)
 Applies operation on a given cloud. More...
 

Static Public Member Functions

static Operation GetOperationByName (const QString &name)
 Returns the operation enumerator based on its name.
 
static QString GetOperationName (Operation op, const QString &sf1, const QString &sf2=QString())
 Returns operation name.
 
static bool Apply (ccPointCloud *cloud, Operation op, int sf1Idx, bool inplace, SF2 *sf2=nullptr, QWidget *parent=nullptr)
 Applies operation on a given cloud. More...
 

Protected Member Functions

void onOperationIndexChanged (int index)
 Called when the operation combo-box is modified.
 
void onSF2IndexChanged (int index)
 Called when the SF2 combo-box is modified.
 
int getSF1Index ()
 Returns first selected SF index.
 
int getSF2Index ()
 Returns second selected SF index.
 

Detailed Description

Dialog to choose 2 scalar fields (SF) and one operation for arithmetics processing.

Member Function Documentation

◆ apply()

bool ccScalarFieldArithmeticsDlg::apply ( ccPointCloud *  cloud)

Applies operation on a given cloud.

Should be applied on the same cloud as the one input to the constructor Otherwise you'd better know what you're doing ;).

Parameters
cloudcloud on which to apply the SF operation
Returns
success

◆ Apply()

bool ccScalarFieldArithmeticsDlg::Apply ( ccPointCloud *  cloud,
Operation  op,
int  sf1Idx,
bool  inplace,
SF2 sf2 = nullptr,
QWidget *  parent = nullptr 
)
static

Applies operation on a given cloud.

Parameters
cloudcloud on which to apply the SF operation
opoperation
sf1Idxfirst (or only) scalar field index
inplacewhether the operation should be applied in place (SF1). Otherwise a new SF will be created.
sf2secondary scalar field / value (only for PLUS, MINUS, MULTIPLY and DIVIDE operations)
parentparent widget (optional)
Returns
success

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