![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
#include <GenericCloud.h>

Public Types | |
| using | genericPointAction = std::function< void(const CCVector3 &, ScalarType &)> |
| Generic function applied to a point (used by foreach) More... | |
Public Member Functions | |
| GenericCloud ()=default | |
| Default constructor. More... | |
| virtual | ~GenericCloud ()=default |
| Default destructor. More... | |
| virtual unsigned | size () const =0 |
| Returns the number of points. More... | |
| virtual bool | hasPoints () const |
| virtual void | forEach (genericPointAction action)=0 |
| Fast iteration mechanism. More... | |
| virtual void | getBoundingBox (CCVector3 &bbMin, CCVector3 &bbMax)=0 |
| Returns the cloud bounding box. More... | |
| virtual unsigned char | testVisibility (const CCVector3 &P) const |
| virtual void | placeIteratorAtBeginning ()=0 |
| Sets the cloud iterator at the beginning. More... | |
| virtual const CCVector3 * | getNextPoint ()=0 |
| Returns the next point (relatively to the global iterator position) More... | |
| virtual bool | enableScalarField ()=0 |
| Enables the scalar field associated to the cloud. More... | |
| virtual bool | isScalarFieldEnabled () const =0 |
| Returns true if the scalar field is enabled, false otherwise. More... | |
| virtual void | setPointScalarValue (unsigned pointIndex, ScalarType value)=0 |
| Sets the ith point associated scalar value. More... | |
| virtual ScalarType | getPointScalarValue (unsigned pointIndex) const =0 |
| Returns the ith point associated scalar value. More... | |
A generic 3D point cloud interface for data communication between library and client applications
Definition at line 20 of file GenericCloud.h.
| using cloudViewer::GenericCloud::genericPointAction = std::function<void(const CCVector3&, ScalarType&)> |
Generic function applied to a point (used by foreach)
Definition at line 29 of file GenericCloud.h.
|
default |
Default constructor.
|
virtualdefault |
Default destructor.
|
pure virtual |
Enables the scalar field associated to the cloud.
If the scalar field structure is not yet initialized/allocated, this method gives the signal for its creation. Otherwise, if possible the structure size should be pre-reserved with the same number of elements as the point cloud.
Implemented in NumpyCloud, PyGenericCloud< GenericCloudBase >, PyGenericCloud< cloudViewer::GenericIndexedCloud >, cloudViewer::ReferenceCloud, cloudViewer::PointCloudTpl< ccGenericPointCloud >, cloudViewer::PointCloudTpl< GenericIndexedCloudPersist >, and cloudViewer::DgmOctreeReferenceCloud.
Referenced by cloudViewer::ScalarFieldTools::applyScalarFieldGaussianFilter(), cloudViewer::DistanceComputationTools::computeApproxCloud2CloudDistance(), cloudViewer::GeometricalAnalysisTools::ComputeCharactersitic(), cloudViewer::DistanceComputationTools::computeCloud2BoxEquation(), cloudViewer::DistanceComputationTools::computeCloud2CloudDistances(), cloudViewer::DistanceComputationTools::computeCloud2ConeEquation(), cloudViewer::DistanceComputationTools::computeCloud2CylinderEquation(), cloudViewer::DistanceComputationTools::computeCloud2DiscEquation(), cloudViewer::DistanceComputationTools::computeCloud2MeshDistances(), cloudViewer::DistanceComputationTools::computeCloud2PlaneEquation(), cloudViewer::DistanceComputationTools::computeCloud2PolylineEquation(), cloudViewer::DistanceComputationTools::computeCloud2RectangleEquation(), cloudViewer::DistanceComputationTools::computeCloud2SphereEquation(), qCanupoTools::ComputeCorePointsDescriptors(), cloudViewer::DistanceComputationTools::computeGeodesicDistances(), cloudViewer::GeometricalAnalysisTools::ComputeLocalDensityApprox(), cloudViewer::ScalarFieldTools::computeScalarFieldGradient(), define_GenericCloud(), cloudViewer::GeometricalAnalysisTools::FlagDuplicatePoints(), ccRegistrationTools::ICP(), cloudViewer::AutoSegmentationTools::labelConnectedComponents(), cloudViewer::geometry::pybind_cloudbase(), cloudViewer::DgmOctree::rayCast(), and cloudViewer::StatisticalTestingTools::testCloudWithStatisticalModel().
|
pure virtual |
Fast iteration mechanism.
Virtual method to apply a function to the whole cloud
| action | the function to apply (see GenericCloud::genericPointAction) |
Implemented in NumpyCloud, cloudViewer::ReferenceCloud, cloudViewer::DgmOctreeReferenceCloud, cloudViewer::PointCloudTpl< ccGenericPointCloud >, cloudViewer::PointCloudTpl< GenericIndexedCloudPersist >, PyGenericCloud< GenericCloudBase >, and PyGenericCloud< cloudViewer::GenericIndexedCloud >.
Referenced by cloudViewer::DistanceComputationTools::computeCloud2MeshDistances(), cloudViewer::DistanceComputationTools::computeGeodesicDistances(), define_GenericCloud(), and cloudViewer::GeometricalAnalysisTools::FlagDuplicatePoints().
|
pure virtual |
Returns the cloud bounding box.
Virtual method to request the cloud bounding box limits
| bbMin | lower bounding-box limits (Xmin,Ymin,Zmin) |
| bbMax | higher bounding-box limits (Xmax,Ymax,Zmax) |
Implemented in NumpyCloud, PyGenericCloud< GenericCloudBase >, PyGenericCloud< cloudViewer::GenericIndexedCloud >, cloudViewer::ReferenceCloud, cloudViewer::PointCloudTpl< ccGenericPointCloud >, cloudViewer::PointCloudTpl< GenericIndexedCloudPersist >, and cloudViewer::DgmOctreeReferenceCloud.
Referenced by PCVContext::associateToEntity(), ccAlignDlg::changeSamplingMethod(), cloudViewer::DistanceComputationTools::computeCloud2MeshDistances(), define_GenericCloud(), cloudViewer::PointProjectionTools::developCloudOnCylinder(), cloudViewer::Delaunay2dMesh::getBoundingBox(), cloudViewer::SimpleMesh::getBoundingBox(), cloudViewer::geometry::pybind_cloudbase(), cloudViewer::FPCSRegistrationTools::RegisterClouds(), cloudViewer::DistanceComputationTools::synchronizeOctrees(), cloudViewer::Neighbourhood::triangulateFromQuadric(), and cloudViewer::DgmOctree::updateMinAndMaxTables().
|
pure virtual |
Returns the next point (relatively to the global iterator position)
Virtual method to handle the cloud global iterator. Global iterator position should be increased by one each time this method is called. Warning:
Implemented in NumpyCloud, PyGenericCloud< GenericCloudBase >, PyGenericCloud< cloudViewer::GenericIndexedCloud >, cloudViewer::ReferenceCloud, cloudViewer::PointCloudTpl< ccGenericPointCloud >, cloudViewer::PointCloudTpl< GenericIndexedCloudPersist >, and cloudViewer::DgmOctreeReferenceCloud.
Referenced by cloudViewer::PointProjectionTools::applyTransformation(), cloudViewer::DistanceComputationTools::computeCloud2PlaneDistanceRMS(), cloudViewer::DistanceComputationTools::ComputeCloud2PlaneMaxDistance(), cloudViewer::DistanceComputationTools::ComputeCloud2PlaneRobustMax(), cloudViewer::GeometricalAnalysisTools::ComputeCrossCovarianceMatrix(), cloudViewer::HornRegistrationTools::ComputeRMS(), cloudViewer::GeometricalAnalysisTools::ComputeWeightedCrossCovarianceMatrix(), define_GenericCloud(), cloudViewer::PointProjectionTools::developCloudOnCone(), cloudViewer::PointProjectionTools::developCloudOnCylinder(), PCVContext::GLAccumPixel(), cloudViewer::Grid3D< Type >::intersectWith(), cloudViewer::geometry::pybind_cloudbase(), and cloudViewer::RegistrationTools::RegistrationProcedure().
|
pure virtual |
Returns the ith point associated scalar value.
Implemented in PyGenericCloud< GenericCloudBase >, PyGenericCloud< cloudViewer::GenericIndexedCloud >, cloudViewer::ReferenceCloud, cloudViewer::PointCloudTpl< ccGenericPointCloud >, cloudViewer::PointCloudTpl< GenericIndexedCloudPersist >, and cloudViewer::DgmOctreeReferenceCloud.
Referenced by CCCloudToDraco(), cloudViewer::StatisticalTestingTools::computeAdaptativeChi2Dist(), cloudViewer::ScalarFieldTools::computeCellGaussianFilter(), cloudViewer::GeometricalAnalysisTools::ComputeCharactersitic(), cloudViewer::WeibullDistribution::computeChi2Dist(), cloudViewer::NormalDistribution::computeChi2Dist(), cloudViewer::ScalarFieldTools::computeKmeans(), cloudViewer::ScalarFieldTools::computeMeanScalarValue(), cloudViewer::ScalarFieldTools::computeMeanSquareScalarValue(), cloudViewer::NormalDistribution::computeParameters(), cloudViewer::ScalarFieldTools::computeScalarFieldExtremas(), cloudViewer::ScalarFieldTools::computeScalarFieldHistogram(), cloudViewer::ScalarFieldTools::countScalarFieldValidValues(), ccCropTool::Crop(), define_GenericCloud(), cloudViewer::DistanceComputationTools::diff(), cloudViewer::AutoSegmentationTools::extractConnectedComponents(), cloudViewer::DgmOctree::findNearestNeighborsStartingFromCell(), cloudViewer::ReferenceCloud::forEach(), cloudViewer::AutoSegmentationTools::frontPropagationBasedSegmentation(), ccRegistrationTools::ICP(), cloudViewer::ScalarFieldTools::multiplyScalarFields(), ScalarDialog::onItemPicked(), cloudViewer::geometry::pybind_cloudbase(), cloudViewer::CloudSamplingTools::resampleCloudSpatially(), and cloudViewer::ManualSegmentationTools::segment().
|
inlinevirtual |
Definition at line 37 of file GenericCloud.h.
References size.
Referenced by cloudViewer::t::geometry::PointCloud::FromLegacy(), ccPolyline::IsEmpty(), cloudViewer::geometry::pybind_cloudbase(), and cloudViewer::io::rpc::SetPointCloud().
|
pure virtual |
Returns true if the scalar field is enabled, false otherwise.
Implemented in NumpyCloud, PyGenericCloud< GenericCloudBase >, PyGenericCloud< cloudViewer::GenericIndexedCloud >, cloudViewer::ReferenceCloud, cloudViewer::PointCloudTpl< ccGenericPointCloud >, cloudViewer::PointCloudTpl< GenericIndexedCloudPersist >, and cloudViewer::DgmOctreeReferenceCloud.
Referenced by cloudViewer::AutoSegmentationTools::extractConnectedComponents(), and cloudViewer::geometry::pybind_cloudbase().
|
pure virtual |
Sets the cloud iterator at the beginning.
Virtual method to handle the cloud global iterator
Implemented in NumpyCloud, PyGenericCloud< GenericCloudBase >, PyGenericCloud< cloudViewer::GenericIndexedCloud >, cloudViewer::ReferenceCloud, cloudViewer::PointCloudTpl< ccGenericPointCloud >, cloudViewer::PointCloudTpl< GenericIndexedCloudPersist >, and cloudViewer::DgmOctreeReferenceCloud.
Referenced by cloudViewer::PointProjectionTools::applyTransformation(), cloudViewer::DistanceComputationTools::computeCloud2PlaneDistanceRMS(), cloudViewer::DistanceComputationTools::ComputeCloud2PlaneMaxDistance(), cloudViewer::DistanceComputationTools::ComputeCloud2PlaneRobustMax(), cloudViewer::GeometricalAnalysisTools::ComputeCrossCovarianceMatrix(), cloudViewer::HornRegistrationTools::ComputeRMS(), cloudViewer::PointProjectionTools::computeTriangulation(), cloudViewer::GeometricalAnalysisTools::ComputeWeightedCrossCovarianceMatrix(), define_GenericCloud(), cloudViewer::PointProjectionTools::developCloudOnCone(), cloudViewer::PointProjectionTools::developCloudOnCylinder(), PCVContext::GLAccumPixel(), cloudViewer::Grid3D< Type >::intersectWith(), cloudViewer::geometry::pybind_cloudbase(), and cloudViewer::RegistrationTools::RegistrationProcedure().
|
pure virtual |
Sets the ith point associated scalar value.
Implemented in PyGenericCloud< GenericCloudBase >, PyGenericCloud< cloudViewer::GenericIndexedCloud >, cloudViewer::ReferenceCloud, cloudViewer::PointCloudTpl< ccGenericPointCloud >, cloudViewer::PointCloudTpl< GenericIndexedCloudPersist >, and cloudViewer::DgmOctreeReferenceCloud.
Referenced by cloudViewer::DistanceComputationTools::computeApproxCloud2CloudDistance(), cloudViewer::GeometricalAnalysisTools::ComputeCharactersitic(), cloudViewer::DistanceComputationTools::computeCloud2BoxEquation(), cloudViewer::DistanceComputationTools::computeCloud2CloudDistances(), cloudViewer::DistanceComputationTools::computeCloud2ConeEquation(), cloudViewer::DistanceComputationTools::computeCloud2CylinderEquation(), cloudViewer::DistanceComputationTools::computeCloud2DiscEquation(), cloudViewer::DistanceComputationTools::computeCloud2PlaneEquation(), cloudViewer::DistanceComputationTools::computeCloud2PolylineEquation(), cloudViewer::DistanceComputationTools::computeCloud2RectangleEquation(), cloudViewer::DistanceComputationTools::computeCloud2SphereEquation(), define_GenericCloud(), cloudViewer::DistanceComputationTools::diff(), cloudViewer::GeometricalAnalysisTools::FlagDuplicatePointsInACellAtLevel(), cloudViewer::ReferenceCloud::forEach(), cloudViewer::AutoSegmentationTools::frontPropagationBasedSegmentation(), cloudViewer::ScalarFieldTools::multiplyScalarFields(), cloudViewer::geometry::pybind_cloudbase(), cloudViewer::DgmOctree::rayCast(), and FastMarchingForFacetExtraction::updateFlagsTable().
|
pure virtual |
Returns the number of points.
Virtual method to request the cloud size
Implemented in NumpyCloud, PyGenericCloud< GenericCloudBase >, PyGenericCloud< cloudViewer::GenericIndexedCloud >, cloudViewer::ReferenceCloud, cloudViewer::PointCloudTpl< ccGenericPointCloud >, cloudViewer::PointCloudTpl< GenericIndexedCloudPersist >, and cloudViewer::DgmOctreeReferenceCloud.
Referenced by cloudViewer::PointProjectionTools::Transformation::apply(), cloudViewer::ScalarFieldTools::applyScalarFieldGaussianFilter(), ccLibAlgorithms::ApplyScaleMatchingAlgorithm(), ccGraphicalSegmentationTool::applySegmentation(), cloudViewer::PointProjectionTools::applyTransformation(), cloudViewer::TrueKdTree::build(), cloudViewer::KDTree::buildFromCloud(), CCCloudToDraco(), CCMeshToDraco(), ccRasterizeTool::ccRasterizeTool(), ccAlignDlg::changeSamplingMethod(), qCanupoProcess::Classify(), ConvexConcaveHullReconstruction::compute(), GreedyTriangulation::compute(), MarchingCubeReconstruction::compute(), NurbsSurfaceReconstruction::compute(), PoissonReconstruction::compute(), qM3C2Process::Compute(), cloudViewer::Neighbourhood::compute3DQuadric(), cloudViewer::StatisticalTestingTools::computeAdaptativeChi2Dist(), cloudViewer::DistanceComputationTools::computeApproxCloud2CloudDistance(), cloudViewer::GeometricalAnalysisTools::ComputeCharactersitic(), cloudViewer::WeibullDistribution::computeChi2Dist(), cloudViewer::NormalDistribution::computeChi2Dist(), cloudViewer::DistanceComputationTools::computeCloud2BoxEquation(), cloudViewer::DistanceComputationTools::computeCloud2CloudDistances(), cloudViewer::DistanceComputationTools::computeCloud2ConeEquation(), cloudViewer::DistanceComputationTools::computeCloud2CylinderEquation(), cloudViewer::DistanceComputationTools::computeCloud2DiscEquation(), cloudViewer::DistanceComputationTools::computeCloud2MeshDistances(), cloudViewer::DistanceComputationTools::computeCloud2MeshDistancesWithOctree(), cloudViewer::DistanceComputationTools::computeCloud2MeshDistanceWithOctree(), cloudViewer::DistanceComputationTools::computeCloud2PlaneDistanceRMS(), cloudViewer::DistanceComputationTools::computeCloud2PlaneEquation(), cloudViewer::DistanceComputationTools::ComputeCloud2PlaneMaxDistance(), cloudViewer::DistanceComputationTools::ComputeCloud2PlaneRobustMax(), cloudViewer::DistanceComputationTools::computeCloud2PolylineEquation(), cloudViewer::DistanceComputationTools::computeCloud2RectangleEquation(), cloudViewer::DistanceComputationTools::computeCloud2SphereEquation(), qCanupoTools::ComputeCorePointsDescriptors(), qM3C2Normals::ComputeCorePointsNormals(), cloudViewer::Neighbourhood::computeCovarianceMatrix(), cloudViewer::GeometricalAnalysisTools::ComputeCovarianceMatrix(), cloudViewer::GeometricalAnalysisTools::ComputeCrossCovarianceMatrix(), cloudViewer::Neighbourhood::computeCurvature(), ComputeFacetExtensions(), cloudViewer::Neighbourhood::computeFeature(), cloudViewer::DistanceComputationTools::computeGeodesicDistances(), cloudViewer::Neighbourhood::computeGravityCenter(), cloudViewer::GeometricalAnalysisTools::ComputeGravityCenter(), cloudViewer::ScalarFieldTools::computeKmeans(), cloudViewer::Neighbourhood::computeLargestRadius(), cloudViewer::Neighbourhood::computeLeastSquareBestFittingPlane(), cloudViewer::GeometricalAnalysisTools::ComputeLocalDensityApprox(), ComputeMathOpWithNearestNeighbor(), cloudViewer::ScalarFieldTools::computeMeanScalarValue(), cloudViewer::ScalarFieldTools::computeMeanSquareScalarValue(), cloudViewer::Neighbourhood::computeMomentOrder1(), cloudViewer::NormalDistribution::computeParameters(), cloudViewer::Neighbourhood::computeQuadric(), DistanceMapGenerationTool::ComputeRadialDist(), cloudViewer::FPCSRegistrationTools::ComputeRegistrationScore(), cloudViewer::HornRegistrationTools::ComputeRMS(), cloudViewer::ScalarFieldTools::computeScalarFieldExtremas(), cloudViewer::ScalarFieldTools::computeScalarFieldGradient(), cloudViewer::ScalarFieldTools::computeScalarFieldHistogram(), DistanceMapGenerationTool::ComputeSurfacesAndVolumes(), cloudViewer::PointProjectionTools::computeTriangulation(), cloudViewer::GeometricalAnalysisTools::ComputeWeightedCrossCovarianceMatrix(), cloudViewer::GeometricalAnalysisTools::ComputeWeightedGravityCenter(), DistanceMapGenerationTool::ConvertMapToCloud(), DistanceMapGenerationTool::ConvertProfileToMesh(), cloudViewer::ScalarFieldTools::countScalarFieldValidValues(), ccAlignDlg::dataSamplingRateChanged(), define_GenericCloud(), cloudViewer::GeometricalAnalysisTools::DetectCircle(), cloudViewer::GeometricalAnalysisTools::DetectSphereRobust(), cloudViewer::PointProjectionTools::developCloudOnCone(), cloudViewer::PointProjectionTools::developCloudOnCylinder(), cloudViewer::DistanceComputationTools::diff(), qPCV::doAction(), ccGraphicalSegmentationTool::doActionUseExistingPolyline(), ccGraphicalSegmentationTool::doExportSegmentationPolyline(), cloudViewer::DgmOctree::executeFunctionForAllCellsAtLevel(), cloudViewer::DgmOctree::executeFunctionForAllCellsStartingAtLevel(), StereogramDialog::exportCurrentSelection(), qFacets::exportFacets(), cloudViewer::AutoSegmentationTools::extractConnectedComponents(), ccPropertiesTreeDelegate::fillWithPointCloud(), cloudViewer::FPCSRegistrationTools::FindBase(), ccInnerRect2DFinder::findBiggestRect(), cloudViewer::FPCSRegistrationTools::FindCongruentBases(), cloudViewer::GeometricalAnalysisTools::FlagDuplicatePoints(), cloudViewer::AutoSegmentationTools::frontPropagationBasedSegmentation(), cloudViewer::DgmOctree::genericBuild(), cloudViewer::ReferenceCloud::getCurrentPointCoordinates(), ccLibAlgorithms::GetDefaultCloudKernelSize(), ccSubsamplingDlg::getSampledCloud(), ccAlignDlg::getSampledData(), ccAlignDlg::getSampledModel(), PCVContext::GLAccumPixel(), ccRegistrationTools::ICP(), ccCommandLineParser::importFile(), ImportSourceVertices(), ccEntityAction::importToSF(), ccInnerRect2DFinder::init(), cloudViewer::Grid3D< Type >::intersectWith(), cloudViewer::ManualSegmentationTools::isPointInsidePoly(), MergeOldTriangles(), ccAlignDlg::modelSamplingRateChanged(), cloudViewer::ScalarFieldTools::multiplyScalarFields(), cloudViewer::CloudSamplingTools::noiseFilter(), ccColorLevelsDlg::onApply(), masc::ContextBasedFeature::prepare(), masc::PointFeature::prepare(), masc::Tools::PrepareFeatures(), CommandDelaunayTri::process(), cloudViewer::geometry::pybind_cloudbase(), cloudViewer::GeometricalAnalysisTools::RefineSphereLS(), cloudViewer::ICPRegistrationTools::Register(), cloudViewer::FPCSRegistrationTools::RegisterClouds(), cloudViewer::RegistrationTools::RegistrationProcedure(), cloudViewer::Delaunay2dMesh::removeOuterTriangles(), cloudViewer::CloudSamplingTools::resampleCloudSpatially(), PNFilter::saveToFile(), PVFilter::saveToFile(), MAFilter::saveToFile(), LASFilter::saveToFile(), ccGraphicalSegmentationTool::segment(), cloudViewer::ManualSegmentationTools::segment(), cloudViewer::ManualSegmentationTools::segmentMesh(), cloudViewer::ManualSegmentationTools::segmentMeshWithAABox(), cloudViewer::ManualSegmentationTools::segmentMeshWithAAPlane(), ccEntityAction::sfAddIdField(), cloudViewer::CloudSamplingTools::sorFilter(), FastMarchingForFacetExtraction::step(), cloudViewer::CloudSamplingTools::subsampleCloudRandomly(), cloudViewer::DistanceComputationTools::synchronizeOctrees(), cloudViewer::Delaunay2dMesh::TesselateContour(), ToFbxMesh(), cloudViewer::Neighbourhood::triangulateOnPlane(), cloudViewer::CloudSamplingTools::UniformDownSample(), ccColorLevelsDlg::updateHistogram(), and qM3C2Normals::UpdateNormalOrientationsWithCloud().
|
inlinevirtual |
Returns a given point visibility state (relatively to a sensor for instance) Generic method to request a point visibility (should be overloaded if this functionality is required). The point visibility is such as defined in Daniel Girardeau-Montaut's PhD manuscript (see Chapter 2, section 2-3-3). In this case, a ground based laser sensor model should be used to determine it. This method is called before performing any point-to-cloud comparison. If the result is not POINT_VISIBLE, then the comparison won't be performed and the scalar field value associated to this point will be this visibility value.
| P | the 3D point to test |
Reimplemented in ccPointCloud, and cloudViewer::ReferenceCloud.
Definition at line 65 of file GenericCloud.h.
References POINT_VISIBLE.
Referenced by cloudViewer::DistanceComputationTools::computeCellHausdorffDistance(), cloudViewer::DistanceComputationTools::computeCellHausdorffDistanceWithLocalModel(), define_GenericCloud(), and cloudViewer::geometry::pybind_cloudbase().