ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
cloudViewer::ReferenceCloud Class Reference

A very simple point cloud (no point duplication) More...

#include <ReferenceCloud.h>

Inheritance diagram for cloudViewer::ReferenceCloud:
Collaboration diagram for cloudViewer::ReferenceCloud:

Public Member Functions

 ReferenceCloud (GenericIndexedCloudPersist *associatedCloud)
 Default constructor. More...
 
 ReferenceCloud (const ReferenceCloud &refCloud)
 Copy constructor. More...
 
 ~ReferenceCloud () override=default
 Destructor. More...
 
unsigned size () const override
 Returns the number of points. More...
 
void forEach (genericPointAction action) override
 Fast iteration mechanism. More...
 
void getBoundingBox (CCVector3 &bbMin, CCVector3 &bbMax) override
 Returns the cloud bounding box. More...
 
unsigned char testVisibility (const CCVector3 &P) const override
 
void placeIteratorAtBeginning () override
 Sets the cloud iterator at the beginning. More...
 
const CCVector3getNextPoint () override
 Returns the next point (relatively to the global iterator position) More...
 
bool enableScalarField () override
 Enables the scalar field associated to the cloud. More...
 
bool isScalarFieldEnabled () const override
 Returns true if the scalar field is enabled, false otherwise. More...
 
void setPointScalarValue (unsigned pointIndex, ScalarType value) override
 Sets the ith point associated scalar value. More...
 
ScalarType getPointScalarValue (unsigned pointIndex) const override
 Returns the ith point associated scalar value. More...
 
const CCVector3getPoint (unsigned index) const override
 Returns the ith point. More...
 
void getPoint (unsigned index, CCVector3 &P) const override
 Returns the ith point. More...
 
void getPoint (unsigned index, double P[3]) const override
 
const CCVector3getPointPersistentPtr (unsigned index) override
 Returns the ith point as a persistent pointer. More...
 
virtual unsigned getPointGlobalIndex (unsigned localIndex) const
 
virtual const CCVector3getCurrentPointCoordinates () const
 Returns the coordinates of the point pointed by the current element. More...
 
virtual unsigned getCurrentPointGlobalIndex () const
 Returns the global index of the point pointed by the current element. More...
 
virtual ScalarType getCurrentPointScalarValue () const
 Returns the current point associated scalar value. More...
 
virtual void setCurrentPointScalarValue (ScalarType value)
 Sets the current point associated scalar value. More...
 
virtual void forwardIterator ()
 Forwards the local element iterator. More...
 
virtual void clear (bool releaseMemory=false)
 Clears the cloud. More...
 
virtual bool addPointIndex (unsigned globalIndex)
 Point global index insertion mechanism. More...
 
virtual bool addPointIndex (unsigned firstIndex, unsigned lastIndex)
 Point global index insertion mechanism (range) More...
 
virtual void setPointIndex (unsigned localIndex, unsigned globalIndex)
 Sets global index for a given element. More...
 
virtual bool reserve (unsigned n)
 Reserves some memory for hosting the point references. More...
 
virtual bool resize (unsigned n)
 Presets the size of the vector used to store point references. More...
 
virtual unsigned capacity () const
 Returns max capacity. More...
 
virtual void swap (unsigned i, unsigned j)
 Swaps two point references. More...
 
virtual void removeCurrentPointGlobalIndex ()
 Removes current element. More...
 
virtual void removePointGlobalIndex (unsigned localIndex)
 Removes a given element. More...
 
virtual GenericIndexedCloudPersistgetAssociatedCloud ()
 Returns the associated (source) cloud. More...
 
virtual const GenericIndexedCloudPersistgetAssociatedCloud () const
 Returns the associated (source) cloud (const version) More...
 
virtual void setAssociatedCloud (GenericIndexedCloudPersist *cloud)
 Sets the associated (source) cloud. More...
 
bool add (const ReferenceCloud &cloud)
 Add another reference cloud. More...
 
void invalidateBoundingBox ()
 Invalidates the bounding-box. More...
 
- Public Member Functions inherited from cloudViewer::GenericIndexedCloudPersist
 ~GenericIndexedCloudPersist () override=default
 Default destructor. More...
 
- Public Member Functions inherited from cloudViewer::GenericIndexedCloud
 ~GenericIndexedCloud () override=default
 Default destructor. More...
 
virtual bool normalsAvailable () const
 Returns whether normals are available. More...
 
virtual const CCVector3getNormal (unsigned index) const
 If per-point normals are available, returns the one at a specific index. More...
 
- Public Member Functions inherited from cloudViewer::GenericCloud
 GenericCloud ()=default
 Default constructor. More...
 
virtual ~GenericCloud ()=default
 Default destructor. More...
 
virtual bool hasPoints () const
 

Protected Types

using ReferencesContainer = std::vector< unsigned int >
 Container of 3D point indexes. More...
 

Protected Attributes

ReferencesContainer m_theIndexes
 Indexes of (some of) the associated cloud points. More...
 
std::atomic< unsigned > m_globalIterator
 Iterator on the point references container. More...
 
BoundingBox m_bbox
 Bounding-box. More...
 
GenericIndexedCloudPersistm_theAssociatedCloud
 Associated cloud. More...
 
std::mutex m_mutex
 For concurrent access. More...
 

Additional Inherited Members

- Public Types inherited from cloudViewer::GenericCloud
using genericPointAction = std::function< void(const CCVector3 &, ScalarType &)>
 Generic function applied to a point (used by foreach) More...
 

Detailed Description

A very simple point cloud (no point duplication)

Implements the GenericIndexedCloudPersist interface. A simple point cloud that stores references to Generic3dPoint instances in a vector.

Partial thread safety for all methods that can change the size of the cloud or that change or rely on point ordering.

Definition at line 29 of file ReferenceCloud.h.

Member Typedef Documentation

◆ ReferencesContainer

using cloudViewer::ReferenceCloud::ReferencesContainer = std::vector<unsigned int>
protected

Container of 3D point indexes.

Definition at line 231 of file ReferenceCloud.h.

Constructor & Destructor Documentation

◆ ReferenceCloud() [1/2]

ReferenceCloud::ReferenceCloud ( GenericIndexedCloudPersist associatedCloud)
explicit

Default constructor.

Definition at line 15 of file ReferenceCloud.cpp.

◆ ReferenceCloud() [2/2]

ReferenceCloud::ReferenceCloud ( const ReferenceCloud refCloud)

Copy constructor.

Definition at line 18 of file ReferenceCloud.cpp.

◆ ~ReferenceCloud()

cloudViewer::ReferenceCloud::~ReferenceCloud ( )
overridedefault

Destructor.

Member Function Documentation

◆ add()

bool ReferenceCloud::add ( const ReferenceCloud cloud)

Add another reference cloud.

Warning
Both clouds should have the same reference cloud!
No verification for duplicates! Thread safe.

Definition at line 166 of file ReferenceCloud.cpp.

References invalidateBoundingBox(), m_mutex, m_theAssociatedCloud, m_theIndexes, and size().

Referenced by FastMarchingForFacetExtraction::addCellToCurrentFacet(), ccKdTreeForFacetExtraction::FuseCells(), and cloudViewer::geometry::pybind_cloudbase().

◆ addPointIndex() [1/2]

bool ReferenceCloud::addPointIndex ( unsigned  firstIndex,
unsigned  lastIndex 
)
virtual

Point global index insertion mechanism (range)

Parameters
firstIndexfirst point global index of range
lastIndexlast point global index of range (excluded)
Returns
false if not enough memory Thread safe.

Definition at line 98 of file ReferenceCloud.cpp.

References invalidateBoundingBox(), m_mutex, m_theIndexes, and size().

◆ addPointIndex() [2/2]

bool ReferenceCloud::addPointIndex ( unsigned  globalIndex)
virtual

Point global index insertion mechanism.

Parameters
globalIndexa point global index
Returns
false if not enough memory Thread safe.

Definition at line 84 of file ReferenceCloud.cpp.

References invalidateBoundingBox(), m_mutex, and m_theIndexes.

Referenced by qCanupo2DViewDialog::addOrSelectPoint(), ccGraphicalSegmentationTool::addPointToPolyline(), cloudViewer::CloudSamplingTools::applyNoiseFilterAtLevel(), cloudViewer::TrueKdTree::build(), ccPointPair::ccPointPair(), ccTrace::ccTrace(), ccTracePolylineTool::ccTracePolylineTool(), ComputeCorePointDescriptor(), ComputeCorePointNormal(), cloudViewer::StatisticalTestingTools::computeLocalChi2DistAtLevel(), cloudViewer::DistanceComputationTools::computePoint2MeshDistancesWithOctree(), ccTopologyRelation::constructGraphic(), contourPoly(), contourPoly2(), cloudViewer::GeometricalAnalysisTools::DetectSphereRobust(), qCSF::doAction(), ccGraphicalSegmentationTool::doActionUseExistingPolyline(), cloudViewer::DgmOctree::executeFunctionForAllCellsAtLevel(), cloudViewer::DgmOctree::executeFunctionForAllCellsStartingAtLevel(), ccPointListPickingDlg::exportToNewPolyline(), ccContourExtractor::ExtractConcaveHull2D(), ccContourExtractor::ExtractFlatContour(), ccTrace::finalizePath(), cloudViewer::DgmOctree::findPointNeighbourhood(), GrainsAsEllipsoids::fitEllipsoidToGrain(), ccRasterizeTool::generateContours(), G3Point::G3PointAction::getBorders(), GetConeProfile(), cloudViewer::DgmOctree::getPointsInCellByCellIndex(), cloudViewer::DgmOctree::getPointsInCellsWithSortedCellCodes(), ccAlignDlg::getSampledData(), ccAlignDlg::getSampledModel(), ccRegistrationTools::ICP(), ccCompass::importLineations(), ccCompassImport::importLineations(), ProfileLoader::Load(), SalomeHydroFilter::loadFile(), SinusxFilter::loadFile(), ccTracePolylineTool::onItemPicked(), ccLineationTool::pointPicked(), ccNoteTool::pointPicked(), ccPinchNodeTool::pointPicked(), ccThicknessTool::pointPicked(), ccTracePolylineTool::polylineOverSampling(), CommandCrop2D::process(), CommandCSF::process(), cloudViewer::geometry::pybind_cloudbase(), masc::Tools::RandomSubset(), cloudViewer::ICPRegistrationTools::Register(), cloudViewer::CloudSamplingTools::resampleCloudSpatially(), qCanupo2DViewDialog::resetBoundary(), cloudViewer::ManualSegmentationTools::segment(), cloudViewer::CloudSamplingTools::sorFilter(), cloudViewer::TrueKdTree::split(), cloudViewer::CloudSamplingTools::subsampleCellAtLevel(), cloudViewer::CloudSamplingTools::subsampleCloudRandomly(), DistanceMapGenerationDlg::toggleOverlayGrid(), cloudViewer::CloudSamplingTools::UniformDownSample(), GrainsAsEllipsoids::updateMeshAndLineSet(), and ccGraphicalSegmentationTool::updatePolyLine().

◆ capacity()

virtual unsigned cloudViewer::ReferenceCloud::capacity ( ) const
inlinevirtual

◆ clear()

◆ enableScalarField()

bool cloudViewer::ReferenceCloud::enableScalarField ( )
inlineoverridevirtual

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.

Implements cloudViewer::GenericCloud.

Definition at line 58 of file ReferenceCloud.h.

Referenced by cloudViewer::ICPRegistrationTools::Register().

◆ forEach()

void ReferenceCloud::forEach ( genericPointAction  action)
overridevirtual

Fast iteration mechanism.

Virtual method to apply a function to the whole cloud

Parameters
actionthe function to apply (see GenericCloud::genericPointAction)

Implements cloudViewer::GenericCloud.

Definition at line 133 of file ReferenceCloud.cpp.

References count, cloudViewer::GenericIndexedCloudPersist::getPointPersistentPtr(), cloudViewer::GenericCloud::getPointScalarValue(), m_theAssociatedCloud, m_theIndexes, cloudViewer::GenericCloud::setPointScalarValue(), and size().

◆ forwardIterator()

virtual void cloudViewer::ReferenceCloud::forwardIterator ( )
inlinevirtual

◆ getAssociatedCloud() [1/2]

◆ getAssociatedCloud() [2/2]

virtual const GenericIndexedCloudPersist* cloudViewer::ReferenceCloud::getAssociatedCloud ( ) const
inlinevirtual

Returns the associated (source) cloud (const version)

Definition at line 211 of file ReferenceCloud.h.

◆ getBoundingBox()

void ReferenceCloud::getBoundingBox ( CCVector3 bbMin,
CCVector3 bbMax 
)
overridevirtual

Returns the cloud bounding box.

Virtual method to request the cloud bounding box limits

Parameters
bbMinlower bounding-box limits (Xmin,Ymin,Zmin)
bbMaxhigher bounding-box limits (Xmax,Ymax,Zmax)

Implements cloudViewer::GenericCloud.

Definition at line 37 of file ReferenceCloud.cpp.

References cloudViewer::BoundingBoxTpl< T >::add(), cloudViewer::BoundingBoxTpl< T >::clear(), cloudViewer::GenericIndexedCloud::getPoint(), cloudViewer::BoundingBoxTpl< T >::isValid(), m_bbox, m_mutex, m_theAssociatedCloud, m_theIndexes, cloudViewer::BoundingBoxTpl< T >::maxCorner(), and cloudViewer::BoundingBoxTpl< T >::minCorner().

Referenced by cloudViewer::TrueKdTree::split().

◆ getCurrentPointCoordinates()

const CCVector3 * ReferenceCloud::getCurrentPointCoordinates ( ) const
virtual

Returns the coordinates of the point pointed by the current element.

Returns a persistent pointer.

Definition at line 77 of file ReferenceCloud.cpp.

References cloudViewer::GenericIndexedCloudPersist::getPointPersistentPtr(), m_globalIterator, m_theAssociatedCloud, m_theIndexes, cloudViewer::GenericCloud::size(), and size().

◆ getCurrentPointGlobalIndex()

virtual unsigned cloudViewer::ReferenceCloud::getCurrentPointGlobalIndex ( ) const
inlinevirtual

Returns the global index of the point pointed by the current element.

Definition at line 113 of file ReferenceCloud.h.

References size.

Referenced by cloudViewer::geometry::pybind_cloudbase().

◆ getCurrentPointScalarValue()

virtual ScalarType cloudViewer::ReferenceCloud::getCurrentPointScalarValue ( ) const
inlinevirtual

Returns the current point associated scalar value.

Definition at line 119 of file ReferenceCloud.h.

References size.

Referenced by ComparePointsAndTriangles(), and cloudViewer::geometry::pybind_cloudbase().

◆ getNextPoint()

const CCVector3* cloudViewer::ReferenceCloud::getNextPoint ( )
inlineoverridevirtual

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:

  • the returned object may not be persistent!
  • THIS METHOD MAY NOT BE COMPATIBLE WITH PARALLEL STRATEGIES (see the DgmOctree::executeFunctionForAllCellsAtLevel_MT and DgmOctree::executeFunctionForAllCellsAtStartingLevel_MT methods).
    Returns
    pointer on next point (or 0 if no more)

Implements cloudViewer::GenericCloud.

Definition at line 51 of file ReferenceCloud.h.

References size.

◆ getPoint() [1/3]

const CCVector3* cloudViewer::ReferenceCloud::getPoint ( unsigned  index) const
inlineoverridevirtual

Returns the ith point.

Virtual method to request a point with a specific index. WARNINGS:

  • the returned object may not be persistent!
  • THIS METHOD MAY NOT BE COMPATIBLE WITH PARALLEL STRATEGIES (see the DgmOctree::executeFunctionForAllCellsAtLevel_MT and DgmOctree::executeFunctionForAllCellsAtStartingLevel_MT methods). Consider the other version of getPoint instead or the GenericIndexedCloudPersist class.
    Parameters
    indexof the requested point (between 0 and the cloud size minus 1)
    Returns
    the requested point (undefined behavior if index is invalid)

Implements cloudViewer::GenericIndexedCloud.

Definition at line 79 of file ReferenceCloud.h.

References size.

Referenced by qCanupo2DViewDialog::addOrSelectPoint(), cloudViewer::CloudSamplingTools::applyNoiseFilterAtLevel(), cloudViewer::CloudSamplingTools::applySORFilterAtLevel(), ComparePointsAndTriangles(), GeneralFilters::compute(), cloudViewer::GeometricalAnalysisTools::ComputeApproxPointsDensityInACellAtLevel(), cloudViewer::ScalarFieldTools::computeCellGaussianFilter(), cloudViewer::DistanceComputationTools::computeCellHausdorffDistance(), cloudViewer::DistanceComputationTools::computeCellHausdorffDistanceWithLocalModel(), cloudViewer::DistanceComputationTools::computeCloud2PolylineEquation(), cloudViewer::GeometricalAnalysisTools::ComputeGeomCharacteristicAtLevel(), cloudViewer::StatisticalTestingTools::computeLocalChi2DistAtLevel(), cloudViewer::ScalarFieldTools::computeMeanGradientOnPatch(), ccCompass::convertToPointCloud(), ccPointPair::drawMeOnly(), ccAlignDlg::estimateDelta(), ccCompass::estimateStructureNormals(), ccCompass::fitPlaneToGeoObject(), cloudViewer::GeometricalAnalysisTools::FlagDuplicatePointsInACellAtLevel(), ccKdTreeForFacetExtraction::FuseCells(), qCanupo2DViewDialog::getClosestVertex(), ccPointPair::getDirection(), qCanupo2DViewDialog::moveSelectedPoint(), masc::ContextBasedFeature::prepare(), qCanupo2DViewDialog::removePoint(), SalomeHydroFilter::saveToFile(), SinusxFilter::saveToFile(), HeightProfileFilter::saveToFile(), MascaretFilter::saveToFile(), cloudViewer::TrueKdTree::split(), cloudViewer::CloudSamplingTools::subsampleCellAtLevel(), qCanupo2DViewDialog::updateClassifierPath(), ccLineation::updateMetadata(), ccThickness::updateMetadata(), and DistanceMapGenerationDlg::updateMinAndMaxLimits().

◆ getPoint() [2/3]

void cloudViewer::ReferenceCloud::getPoint ( unsigned  index,
CCVector3 P 
) const
inlineoverridevirtual

Returns the ith point.

Virtual method to request a point with a specific index. Index must be valid (undefined behavior if index is invalid)

Parameters
indexof the requested point (between 0 and the cloud size minus 1)
Poutput point

Implements cloudViewer::GenericIndexedCloud.

Definition at line 83 of file ReferenceCloud.h.

References size.

◆ getPoint() [3/3]

void cloudViewer::ReferenceCloud::getPoint ( unsigned  index,
double  P[3] 
) const
inlineoverridevirtual

Reimplemented from cloudViewer::GenericIndexedCloud.

Definition at line 87 of file ReferenceCloud.h.

References size.

◆ getPointGlobalIndex()

virtual unsigned cloudViewer::ReferenceCloud::getPointGlobalIndex ( unsigned  localIndex) const
inlinevirtual

Returns global index (i.e. relative to the associated cloud) of a given element

Parameters
localIndexlocal index (i.e. relative to the internal index container)

Definition at line 103 of file ReferenceCloud.h.

Referenced by qCanupo2DViewDialog::addOrSelectPoint(), cloudViewer::CloudSamplingTools::applyNoiseFilterAtLevel(), cloudViewer::CloudSamplingTools::applySORFilterAtLevel(), ccPointPair::ccPointPair(), ccTrace::ccTrace(), qCanupoProcess::Classify(), ComparePointsAndTriangles(), ComputeAverageColor(), cloudViewer::ScalarFieldTools::computeCellGaussianFilter(), cloudViewer::DistanceComputationTools::computeCellHausdorffDistance(), cloudViewer::DistanceComputationTools::computeCellHausdorffDistanceWithLocalModel(), ComputeCorePointDescriptor(), cloudViewer::GeometricalAnalysisTools::ComputeGeomCharacteristicAtLevel(), cloudViewer::StatisticalTestingTools::computeLocalChi2DistAtLevel(), ComputeMathOpWithNearestNeighbor(), cloudViewer::ScalarFieldTools::computeMeanGradientOnPatch(), ccGraphicalSegmentationTool::doActionUseExistingPolyline(), ccCompass::estimateStructureNormals(), masc::Classifier::evaluate(), cloudViewer::GeometricalAnalysisTools::FlagDuplicatePointsInACellAtLevel(), ccTrace::getPointNormal(), cloudViewer::geometry::pybind_cloudbase(), RefinePointClassif(), cloudViewer::ICPRegistrationTools::Register(), qCanupo2DViewDialog::removePoint(), cloudViewer::ManualSegmentationTools::segmentMesh(), cloudViewer::TrueKdTree::split(), cloudViewer::CloudSamplingTools::subsampleCellAtLevel(), masc::Classifier::train(), and FastMarchingForFacetExtraction::updateFlagsTable().

◆ getPointPersistentPtr()

const CCVector3* cloudViewer::ReferenceCloud::getPointPersistentPtr ( unsigned  index)
inlineoverridevirtual

Returns the ith point as a persistent pointer.

Virtual method to request a point with a specific index. WARNING: the returned object MUST be persistent in order to be compatible with parallel strategies!

Parameters
indexof the requested point (between 0 and the cloud size minus 1)
Returns
the requested point (or 0 if index is invalid)

Implements cloudViewer::GenericIndexedCloudPersist.

Definition at line 93 of file ReferenceCloud.h.

References size.

Referenced by cloudViewer::ScalarFieldTools::computeCellGaussianFilter(), cloudViewer::DistanceComputationTools::computeCloud2MeshDistanceWithOctree(), cloudViewer::GeometricalAnalysisTools::ComputeGeomCharacteristicAtLevel(), cloudViewer::StatisticalTestingTools::computeLocalChi2DistAtLevel(), cloudViewer::ScalarFieldTools::computeMeanGradientOnPatch(), and ComputeNeighborhood2MeshDistancesWithOctree().

◆ getPointScalarValue()

◆ invalidateBoundingBox()

void cloudViewer::ReferenceCloud::invalidateBoundingBox ( )
inline

◆ isScalarFieldEnabled()

bool cloudViewer::ReferenceCloud::isScalarFieldEnabled ( ) const
inlineoverridevirtual

Returns true if the scalar field is enabled, false otherwise.

Implements cloudViewer::GenericCloud.

Definition at line 62 of file ReferenceCloud.h.

◆ placeIteratorAtBeginning()

void cloudViewer::ReferenceCloud::placeIteratorAtBeginning ( )
inlineoverridevirtual

Sets the cloud iterator at the beginning.

Virtual method to handle the cloud global iterator

Implements cloudViewer::GenericCloud.

Definition at line 50 of file ReferenceCloud.h.

Referenced by ComparePointsAndTriangles(), cloudViewer::DgmOctree::extractCCs(), and cloudViewer::FastMarchingForPropagation::setPropagationTimingsAsDistances().

◆ removeCurrentPointGlobalIndex()

virtual void cloudViewer::ReferenceCloud::removeCurrentPointGlobalIndex ( )
inlinevirtual

Removes current element.

WARNING: this method changes the cloud size! Thread safe.

Definition at line 195 of file ReferenceCloud.h.

Referenced by ComparePointsAndTriangles(), and cloudViewer::geometry::pybind_cloudbase().

◆ removePointGlobalIndex()

void ReferenceCloud::removePointGlobalIndex ( unsigned  localIndex)
virtual

Removes a given element.

WARNING: this method changes the cloud size! Thread safe.

Definition at line 146 of file ReferenceCloud.cpp.

References m_mutex, m_theIndexes, and size().

Referenced by cloudViewer::geometry::pybind_cloudbase().

◆ reserve()

bool ReferenceCloud::reserve ( unsigned  n)
virtual

Reserves some memory for hosting the point references.

Parameters
nthe number of points (references) Thread safe.

Definition at line 51 of file ReferenceCloud.cpp.

References m_mutex, and m_theIndexes.

Referenced by qCanupo2DViewDialog::addOrSelectPoint(), ccTracePolylineTool::ccTracePolylineTool(), ComputeCorePointDescriptor(), cloudViewer::StatisticalTestingTools::computeLocalChi2DistAtLevel(), cloudViewer::DistanceComputationTools::computePoint2MeshDistancesWithOctree(), contourPoly(), contourPoly2(), cloudViewer::GeometricalAnalysisTools::DetectSphereRobust(), qCSF::doAction(), ccGraphicalSegmentationTool::doActionUseExistingPolyline(), cloudViewer::DgmOctree::executeFunctionForAllCellsAtLevel(), cloudViewer::DgmOctree::executeFunctionForAllCellsStartingAtLevel(), ccPointListPickingDlg::exportToNewPolyline(), ccContourExtractor::ExtractConcaveHull2D(), ccContourExtractor::ExtractFlatContour(), ccRasterizeTool::generateContours(), GetConeProfile(), ccRegistrationTools::ICP(), ProfileLoader::Load(), SalomeHydroFilter::loadFile(), cloudViewer::CloudSamplingTools::noiseFilter(), ccTracePolylineTool::onItemPicked(), ccTracePolylineTool::polylineOverSampling(), CommandCSF::process(), cloudViewer::geometry::pybind_cloudbase(), masc::Tools::RandomSubset(), cloudViewer::ICPRegistrationTools::Register(), cloudViewer::CloudSamplingTools::resampleCloudSpatially(), qCanupo2DViewDialog::resetBoundary(), cloudViewer::CloudSamplingTools::sorFilter(), cloudViewer::TrueKdTree::split(), cloudViewer::CloudSamplingTools::subsampleCloudWithOctreeAtLevel(), and cloudViewer::CloudSamplingTools::UniformDownSample().

◆ resize()

◆ setAssociatedCloud()

void ReferenceCloud::setAssociatedCloud ( GenericIndexedCloudPersist cloud)
virtual

Sets the associated (source) cloud.

Definition at line 161 of file ReferenceCloud.cpp.

References invalidateBoundingBox(), and m_theAssociatedCloud.

Referenced by cloudViewer::ICPRegistrationTools::Register().

◆ setCurrentPointScalarValue()

virtual void cloudViewer::ReferenceCloud::setCurrentPointScalarValue ( ScalarType  value)
inlinevirtual

◆ setPointIndex()

void ReferenceCloud::setPointIndex ( unsigned  localIndex,
unsigned  globalIndex 
)
virtual

Sets global index for a given element.

Parameters
localIndexlocal index
globalIndexglobal index

Definition at line 127 of file ReferenceCloud.cpp.

References invalidateBoundingBox(), m_theIndexes, and size().

Referenced by qCanupo2DViewDialog::addOrSelectPoint(), qM3C2Tools::GuessBestParams(), cloudViewer::geometry::pybind_cloudbase(), and qCanupo2DViewDialog::removePoint().

◆ setPointScalarValue()

◆ size()

unsigned cloudViewer::ReferenceCloud::size ( ) const
inlineoverridevirtual

Returns the number of points.

Virtual method to request the cloud size

Returns
the cloud size

Implements cloudViewer::GenericCloud.

Definition at line 41 of file ReferenceCloud.h.

Referenced by add(), ccRasterizeTool::addNewContour(), qCanupo2DViewDialog::addOrSelectPoint(), addPointIndex(), cloudViewer::CloudSamplingTools::applyNoiseFilterAtLevel(), ccGraphicalSegmentationTool::applySegmentation(), cloudViewer::CloudSamplingTools::applySORFilterAtLevel(), ccLineationTool::cancel(), ccPointPair::ccPointPair(), ccTrace::ccTrace(), ccGraphicalSegmentationTool::closePolyLine(), ccTracePolylineTool::closePolyLine(), ccGraphicalSegmentationTool::closeRectangle(), ComparePointsAndTriangles(), GeneralFilters::compute(), NurbsCurveFitting::compute(), cloudViewer::DistanceComputationTools::computeApproxCloud2CloudDistance(), cloudViewer::GeometricalAnalysisTools::ComputeApproxPointsDensityInACellAtLevel(), ComputeAverageColor(), cloudViewer::ScalarFieldTools::computeCellGaussianFilter(), cloudViewer::DistanceComputationTools::computeCellHausdorffDistance(), cloudViewer::DistanceComputationTools::computeCellHausdorffDistanceWithLocalModel(), ComputeCellStats(), cloudViewer::DistanceComputationTools::computeCloud2MeshDistancesWithOctree(), cloudViewer::DistanceComputationTools::computeCloud2MeshDistanceWithOctree(), cloudViewer::DistanceComputationTools::computeCloud2PolylineEquation(), ComputeCorePointDescriptor(), ComputeCorePointNormal(), cloudViewer::GeometricalAnalysisTools::ComputeGeomCharacteristicAtLevel(), cloudViewer::StatisticalTestingTools::computeLocalChi2DistAtLevel(), cloudViewer::ScalarFieldTools::computeMeanGradientOnPatch(), ComputeNeighborhood2MeshDistancesWithOctree(), DimensionalityScaleParamsComputer::computeScaleParams(), ccCompass::convertToPointCloud(), ccPointPairRegistrationDlg::convertToSphereCenter(), qFacets::createFacets(), ccCropTool::Crop(), ccAlignDlg::dataSamplingRateChanged(), DescendingLeafSizeComparison(), cloudViewer::GeometricalAnalysisTools::DetectSphereRobust(), ccGraphicalSegmentationTool::doActionUseExistingPolyline(), ccGraphicalSegmentationTool::doExportSegmentationPolyline(), ccPointPair::drawMeOnly(), ccAlignDlg::estimateDelta(), ccCompass::estimateStructureNormals(), masc::Classifier::evaluate(), cloudViewer::DgmOctree::extractCCs(), ccPropertiesTreeDelegate::fillWithPolyline(), ccPropertiesTreeDelegate::fillWithViewProperties(), ccTrace::fitPlane(), ccCompass::fitPlaneToGeoObject(), cloudViewer::GeometricalAnalysisTools::FlagDuplicatePointsInACellAtLevel(), forEach(), cloudViewer::AutoSegmentationTools::frontPropagationBasedSegmentation(), ccKdTreeForFacetExtraction::FuseCells(), ccRasterizeTool::generateContours(), qCanupo2DViewDialog::getClosestVertex(), getCurrentPointCoordinates(), ccPointPair::getDirection(), ccRegistrationTools::ICP(), ccAlignDlg::modelSamplingRateChanged(), qCanupo2DViewDialog::moveSelectedPoint(), cloudViewer::CloudSamplingTools::noiseFilter(), ccTrace::optimizePath(), ccLineationTool::pointPicked(), ccTraceTool::pointPicked(), ccTracePolylineTool::polylineOverSampling(), CommandSubsample::process(), CommandExtractCCs::process(), CommandCrop2D::process(), cloudViewer::geometry::pybind_cloudbase(), cloudViewer::geometry::pybind_facet(), cloudViewer::geometry::pybind_pointcloud(), cloudViewer::geometry::pybind_polyline(), masc::Tools::RandomSubset(), cloudViewer::ICPRegistrationTools::Register(), qCanupo2DViewDialog::removePoint(), removePointGlobalIndex(), cloudViewer::CloudSamplingTools::resampleCellAtLevel(), cloudViewer::CloudSamplingTools::resampleCloudSpatially(), SalomeHydroFilter::saveToFile(), SinusxFilter::saveToFile(), HeightProfileFilter::saveToFile(), MascaretFilter::saveToFile(), cloudViewer::ManualSegmentationTools::segmentMesh(), setPointIndex(), cloudViewer::FastMarchingForPropagation::setPropagationTimingsAsDistances(), FastMarchingForFacetExtraction::setSeedCell(), cloudViewer::CloudSamplingTools::sorFilter(), cloudViewer::TrueKdTree::split(), FastMarchingForFacetExtraction::step(), cloudViewer::CloudSamplingTools::subsampleCellAtLevel(), masc::Classifier::train(), qCanupo2DViewDialog::updateClassifierPath(), FastMarchingForFacetExtraction::updateFlagsTable(), ccLineation::updateMetadata(), ccThickness::updateMetadata(), and DistanceMapGenerationDlg::updateMinAndMaxLimits().

◆ swap()

virtual void cloudViewer::ReferenceCloud::swap ( unsigned  i,
unsigned  j 
)
inlinevirtual

Swaps two point references.

the point references indexes should be smaller than the total number of "reserved" points (see ReferenceCloud::reserve).

Parameters
ithe first point index
jthe second point index Thread safe.

Definition at line 185 of file ReferenceCloud.h.

References std::swap().

Referenced by ComputeCorePointDescriptor(), cloudViewer::geometry::pybind_cloudbase(), and cloudViewer::CloudSamplingTools::subsampleCloudRandomly().

◆ testVisibility()

unsigned char cloudViewer::ReferenceCloud::testVisibility ( const CCVector3 P) const
inlineoverridevirtual

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.

Parameters
Pthe 3D point to test
Returns
visibility (default: POINT_VISIBLE)

Reimplemented from cloudViewer::GenericCloud.

Definition at line 46 of file ReferenceCloud.h.

Member Data Documentation

◆ m_bbox

BoundingBox cloudViewer::ReferenceCloud::m_bbox
protected

Bounding-box.

Definition at line 240 of file ReferenceCloud.h.

Referenced by getBoundingBox().

◆ m_globalIterator

std::atomic<unsigned> cloudViewer::ReferenceCloud::m_globalIterator
protected

Iterator on the point references container.

Definition at line 237 of file ReferenceCloud.h.

Referenced by getCurrentPointCoordinates().

◆ m_mutex

std::mutex cloudViewer::ReferenceCloud::m_mutex
protected

For concurrent access.

Definition at line 250 of file ReferenceCloud.h.

Referenced by add(), addPointIndex(), clear(), getBoundingBox(), removePointGlobalIndex(), reserve(), and resize().

◆ m_theAssociatedCloud

GenericIndexedCloudPersist* cloudViewer::ReferenceCloud::m_theAssociatedCloud
protected

Associated cloud.

The cloud from which references are referring to. WARNING: do not use the inner iterator as it is used to 'implement' the ReferenceCloud one.

Definition at line 247 of file ReferenceCloud.h.

Referenced by add(), forEach(), getBoundingBox(), getCurrentPointCoordinates(), and setAssociatedCloud().

◆ m_theIndexes

ReferencesContainer cloudViewer::ReferenceCloud::m_theIndexes
protected

Indexes of (some of) the associated cloud points.

Definition at line 234 of file ReferenceCloud.h.

Referenced by add(), addPointIndex(), clear(), forEach(), getBoundingBox(), getCurrentPointCoordinates(), removePointGlobalIndex(), reserve(), resize(), and setPointIndex().


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