1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
|
#ifndef CCLIBALGORITHMS_H
#define CCLIBALGORITHMS_H
//##########################################################################
//# #
//# CLOUDCOMPARE #
//# #
//# This program is free software; you can redistribute it and/or modify #
//# it under the terms of the GNU General Public License as published by #
//# the Free Software Foundation; version 2 or later of the License. #
//# #
//# This program is distributed in the hope that it will be useful, #
//# but WITHOUT ANY WARRANTY; without even the implied warranty of #
//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
//# GNU General Public License for more details. #
//# #
//# COPYRIGHT: CloudCompare project #
//# #
//##########################################################################
#include "ccHObject.h"
#include <GeometricalAnalysisTools.h>
class QWidget;
class ccGenericPointCloud;
class ccProgressDialog;
namespace ccLibAlgorithms
{
//! Returns a default first guess for algorithms kernel size (one cloud)
PointCoordinateType GetDefaultCloudKernelSize(ccGenericPointCloud* cloud, unsigned knn = 12);
//! Returns a default first guess for algorithms kernel size (several clouds)
PointCoordinateType GetDefaultCloudKernelSize(const ccHObject::Container& entities, unsigned knn = 12);
/*** CCLib "standalone" algorithms ***/
//! Geometric characteristic (with sub option)
struct GeomCharacteristic
{
GeomCharacteristic(CCLib::GeometricalAnalysisTools::GeomCharacteristic c, int option = 0)
: charac(c)
, subOption(option)
{}
CCLib::GeometricalAnalysisTools::GeomCharacteristic charac;
int subOption = 0;
};
//! Set of GeomCharacteristic instances
typedef std::vector<GeomCharacteristic> GeomCharacteristicSet;
//! Computes geometrical characteristics (see GeometricalAnalysisTools::GeomCharacteristic) on a set of entities
bool ComputeGeomCharacteristics(const GeomCharacteristicSet& characteristics,
PointCoordinateType radius,
ccHObject::Container& entities,
QWidget* parent = nullptr);
//! Computes a geometrical characteristic (see GeometricalAnalysisTools::GeomCharacteristic) on a set of entities
bool ComputeGeomCharacteristic( CCLib::GeometricalAnalysisTools::GeomCharacteristic algo,
int subOption,
PointCoordinateType radius,
ccHObject::Container& entities,
QWidget* parent = nullptr,
ccProgressDialog* progressDialog = nullptr);
//CCLib algorithms handled by the 'ApplyCCLibAlgorithm' method
enum CC_LIB_ALGORITHM { CCLIB_ALGO_SF_GRADIENT,
};
//! Applies a standard CCLib algorithm (see CC_LIB_ALGORITHM) on a set of entities
bool ApplyCCLibAlgorithm( CC_LIB_ALGORITHM algo,
ccHObject::Container& entities,
QWidget* parent = 0,
void** additionalParameters = 0);
//! Scale matching algorithms
enum ScaleMatchingAlgorithm { BB_MAX_DIM, BB_VOLUME, PCA_MAX_DIM, ICP_SCALE };
//! Applies a standard CCLib algorithm (see CC_LIB_ALGORITHM) on a set of entities
bool ApplyScaleMatchingAlgorithm(ScaleMatchingAlgorithm algo,
ccHObject::Container& entities,
double icpRmsDiff,
int icpFinalOverlap,
unsigned refEntityIndex = 0,
QWidget* parent = 0);
}
#endif
|