ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
ccPointCloud Class Reference

A 3D cloud and its associated features (color, normals, scalar fields, etc.) More...

#include <ecvPointCloud.h>

Inheritance diagram for ccPointCloud:
Collaboration diagram for ccPointCloud:

Classes

struct  Grid
 Grid structure. More...
 
struct  RgbFilterOptions
 RGB filter options. More...
 
struct  UnrollBaseParams
 
struct  UnrollConeParams
 
struct  UnrollCylinderParams
 
class  VBO
 
struct  vboSet
 VBO set. More...
 

Public Types

enum  CLONE_WARNINGS { WRN_OUT_OF_MEM_FOR_COLORS = 1 , WRN_OUT_OF_MEM_FOR_NORMALS = 2 , WRN_OUT_OF_MEM_FOR_SFS = 4 , WRN_OUT_OF_MEM_FOR_FWF = 8 }
 Warnings for the partialClone method (bit flags) More...
 
enum  RGB_FILTER_TYPES {
  NONE , BILATERAL , GAUSSIAN , MEAN ,
  MEDIAN
}
 RGB filter types. More...
 
enum  UnrollMode { CYLINDER = 0 , CONE = 1 , STRAIGHTENED_CONE = 2 , STRAIGHTENED_CONE2 = 3 }
 
using BaseClass = cloudViewer::PointCloudTpl< ccGenericPointCloud >
 Base class (shortcut) More...
 
using FWFDescriptorSet = QMap< uint8_t, WaveformDescriptor >
 Waveform descriptors set. More...
 
using FWFDataContainer = std::vector< uint8_t >
 Waveform data container. More...
 
using SharedFWFDataContainer = QSharedPointer< const FWFDataContainer >
 
- Public Types inherited from ccGenericPointCloud
using VisibilityTableType = std::vector< unsigned char >
 Array of "visibility" information for each point. More...
 
- Public Types inherited from ccHObject
enum  DEPENDENCY_FLAGS {
  DP_NONE = 0 , DP_NOTIFY_OTHER_ON_DELETE = 1 , DP_NOTIFY_OTHER_ON_UPDATE , DP_DELETE_OTHER = 8 ,
  DP_PARENT_OF_OTHER = 24
}
 Dependency flags. More...
 
enum  SelectionBehavior { SELECTION_AA_BBOX , SELECTION_FIT_BBOX , SELECTION_IGNORED }
 Behavior when selected. More...
 
using Container = std::vector< ccHObject * >
 Standard instances container (for children, etc.) More...
 
using Shared = QSharedPointer< ccHObject >
 Shared pointer. More...
 
using SharedContainer = std::vector< Shared >
 Shared instances container (for children, etc.) More...
 
using GlobalBoundingBox = cloudViewer::BoundingBoxTpl< double >
 Global (non-shifted) bounding-box. More...
 
- Public Types inherited from ccSerializableObject
enum  DeserializationFlags { DF_POINT_COORDS_64_BITS , DF_SCALAR_VAL_32_BITS = 2 }
 Deserialization flags (bit-field) More...
 
typedef QMultiMap< unsigned, unsigned > LoadedIDMap
 Map of loaded unique IDs (old ID --> new ID) More...
 
- Public Types inherited from cloudViewer::GenericCloud
using genericPointAction = std::function< void(const CCVector3 &, ScalarType &)>
 Generic function applied to a point (used by foreach) More...
 

Public Member Functions

 ccPointCloud (QString name=QString()) throw ()
 Default constructor. More...
 
 ccPointCloud (const ccPointCloud &cloud)
 
 ccPointCloud (const std::vector< Eigen::Vector3d > &points, const std::string &name="cloud")
 
 ~ccPointCloud () override
 Default destructor. More...
 
CV_CLASS_ENUM getClassID () const override
 Returns class ID. More...
 
ccPointCloudpartialClone (const cloudViewer::ReferenceCloud *selection, int *warnings=nullptr, bool withChildEntities=true) const
 Creates a new point cloud object from a ReferenceCloud (selection) More...
 
ccPointCloudcloneThis (ccPointCloud *destCloud=nullptr, bool ignoreChildren=false)
 Clones this entity. More...
 
ccGenericPointCloudclone (ccGenericPointCloud *destCloud=nullptr, bool ignoreChildren=false) override
 Clones this entity. More...
 
ccPointCloudoperator= (const ccPointCloud &cloud)
 Fuses another 3D entity with this one. More...
 
const ccPointCloudoperator+= (const ccPointCloud &cloud)
 
const ccPointCloudoperator+= (ccPointCloud *)
 
ccPointCloud operator+ (const ccPointCloud &cloud) const
 
void clear () override
 Clears the entity from all its points and features. More...
 
void unalloactePoints ()
 Erases the cloud points. More...
 
void unallocateColors ()
 Erases the cloud colors. More...
 
void unallocateNorms ()
 Erases the cloud normals. More...
 
void colorsHaveChanged ()
 
void normalsHaveChanged ()
 Notify a modification of normals display parameters or contents. More...
 
void pointsHaveChanged ()
 Notify a modification of points display parameters or contents. More...
 
bool reserve (unsigned numberOfPoints) override
 Reserves memory for all the active features. More...
 
bool reserveThePointsTable (unsigned _numberOfPoints)
 Reserves memory to store the points coordinates. More...
 
bool reserveTheRGBTable ()
 Reserves memory to store the RGB colors. More...
 
bool reserveTheNormsTable ()
 Reserves memory to store the compressed normals. More...
 
bool resize (unsigned numberOfPoints) override
 Resizes all the active features arrays. More...
 
bool resizeTheRGBTable (bool fillWithWhite=false)
 Resizes the RGB colors array. More...
 
bool resizeTheNormsTable ()
 Resizes the compressed normals array. More...
 
void shrinkToFit ()
 Removes unused capacity. More...
 
ccScalarFieldgetCurrentDisplayedScalarField () const
 Returns the currently displayed scalar (or 0 if none) More...
 
int getCurrentDisplayedScalarFieldIndex () const
 Returns the currently displayed scalar field index (or -1 if none) More...
 
void setCurrentDisplayedScalarField (int index)
 Sets the currently displayed scalar field. More...
 
void deleteScalarField (int index) override
 Deletes a specific scalar field. More...
 
void deleteAllScalarFields () override
 Deletes all scalar fields associated to this cloud. More...
 
int addScalarField (const char *uniqueName) override
 Creates a new scalar field and registers it. More...
 
bool sfColorScaleShown () const
 Returns whether color scale should be displayed or not. More...
 
void showSFColorsScale (bool state)
 Sets whether color scale should be displayed or not. More...
 
size_t gridCount () const
 Returns the number of associated grids. More...
 
Grid::Sharedgrid (size_t gridIndex)
 Returns an associated grid. More...
 
const Grid::Sharedgrid (size_t gridIndex) const
 Returns an associated grid (const verson) More...
 
bool addGrid (Grid::Shared grid)
 Adds an associated grid. More...
 
void removeGrids ()
 Remove all associated grids. More...
 
ccMeshtriangulateGrid (const Grid &grid, double minTriangleAngle_deg=0.0) const
 Meshes a scan grid. More...
 
bool computeNormalsWithGrids (double minTriangleAngle_deg=1.0, ecvProgressDialog *pDlg=nullptr)
 Compute the normals with the associated grid structure(s) More...
 
bool orientNormalsWithGrids (ecvProgressDialog *pDlg=nullptr)
 Orient the normals with the associated grid structure(s) More...
 
bool orientNormalsTowardViewPoint (CCVector3 &VP, ecvProgressDialog *pDlg=nullptr)
 Normals are forced to point to O. More...
 
bool computeNormalsWithOctree (CV_LOCAL_MODEL_TYPES model, ccNormalVectors::Orientation preferredOrientation, PointCoordinateType defaultRadius, ecvProgressDialog *pDlg=nullptr)
 Compute the normals by approximating the local surface around each point. More...
 
bool orientNormalsWithMST (unsigned kNN=6, ecvProgressDialog *pDlg=nullptr)
 Orient the normals with a Minimum Spanning Tree. More...
 
bool orientNormalsWithFM (unsigned char level, ecvProgressDialog *pDlg=nullptr)
 Orient normals with Fast Marching. More...
 
bool hasFWF () const
 Returns whether the cloud has associated Full WaveForm data. More...
 
ccWaveformProxy waveformProxy (unsigned index) const
 Returns a proxy on a given waveform. More...
 
FWFDescriptorSetfwfDescriptors ()
 Gives access to the FWF descriptors. More...
 
const FWFDescriptorSetfwfDescriptors () const
 Gives access to the FWF descriptors (const version) More...
 
std::vector< ccWaveform > & waveforms ()
 Gives access to the associated FWF data. More...
 
const std::vector< ccWaveform > & waveforms () const
 Gives access to the associated FWF data (const version) More...
 
bool reserveTheFWFTable ()
 Reserves the FWF table. More...
 
bool resizeTheFWFTable ()
 Resizes the FWF table. More...
 
SharedFWFDataContainerfwfData ()
 Gives access to the associated FWF data container. More...
 
const SharedFWFDataContainerfwfData () const
 Gives access to the associated FWF data container (const version) More...
 
bool compressFWFData ()
 Compresses the associated FWF data container. More...
 
bool computeFWFAmplitude (double &minVal, double &maxVal, ecvProgressDialog *pDlg=nullptr) const
 Computes the maximum amplitude of all associated waveforms. More...
 
void clearFWFData ()
 Clears all associated FWF data. More...
 
CCVector3 computeGravityCenter ()
 Returns the cloud gravity center. More...
 
void invalidateBoundingBox () override
 Invalidates bounding box. More...
 
void getDrawingParameters (glDrawParams &params) const override
 Returns main OpenGL parameters for this entity. More...
 
unsigned getUniqueIDForDisplay () const override
 Returns object unqiue ID used for display. More...
 
bool hasColors () const override
 Returns whether colors are enabled or not. More...
 
bool hasNormals () const override
 Returns whether normals are enabled or not. More...
 
bool hasScalarFields () const override
 Returns whether one or more scalar fields are instantiated. More...
 
bool hasDisplayedScalarField () const override
 Returns whether an active scalar field is available or not. More...
 
unsigned char testVisibility (const CCVector3 &P) const override
 
bool normalsAvailable () const override
 Returns whether normals are available. More...
 
const CCVector3getNormal (unsigned pointIndex) const override
 If per-point normals are available, returns the one at a specific index. More...
 
const ecvColor::RgbgetScalarValueColor (ScalarType d) const override
 Returns color corresponding to a given scalar value. More...
 
const ecvColor::RgbgetPointScalarValueColor (unsigned pointIndex) const override
 Returns color corresponding to a given point associated scalar value. More...
 
ScalarType getPointDisplayedDistance (unsigned pointIndex) const override
 Returns scalar value associated to a given point. More...
 
const ecvColor::RgbgetPointColor (unsigned pointIndex) const override
 Returns color corresponding to a given point. More...
 
const ColorsTableTypegetPointColors () const
 
ecvColor::RgbgetPointColorPtr (size_t pointIndex)
 
Eigen::Vector3d getEigenColor (size_t index) const
 
std::vector< Eigen::Vector3d > getEigenColors () const
 
void setEigenColors (const std::vector< Eigen::Vector3d > &colors)
 
const CompressedNormTypegetPointNormalIndex (unsigned pointIndex) const override
 Returns compressed normal corresponding to a given point. More...
 
const CCVector3getPointNormal (unsigned pointIndex) const override
 Returns normal corresponding to a given point. More...
 
CCVector3getPointNormalPtr (size_t pointIndex) const
 
std::vector< CCVector3getPointNormals () const
 
std::vector< CCVector3 * > getPointNormalsPtr () const
 
void setPointNormals (const std::vector< CCVector3 > &normals)
 
Eigen::Vector3d getEigenNormal (size_t index) const
 
std::vector< Eigen::Vector3d > getEigenNormals () const
 
void setEigenNormals (const std::vector< Eigen::Vector3d > &normals)
 
cloudViewer::ReferenceCloudcrop (const ccBBox &box, bool inside=true) override
 Crops the cloud inside (or outside) a bounding box. More...
 
cloudViewer::ReferenceCloudcrop (const ecvOrientedBBox &bbox) override
 
virtual void applyRigidTransformation (const ccGLMatrix &trans) override
 Applies a rigid transformation (rotation + translation) More...
 
virtual void scale (PointCoordinateType fx, PointCoordinateType fy, PointCoordinateType fz, CCVector3 center=CCVector3(0, 0, 0)) override
 Multiplies all coordinates by constant factors (one per dimension) More...
 
void refreshBB () override
 Forces bounding-box update. More...
 
ccGenericPointCloudcreateNewCloudFromVisibilitySelection (bool removeSelectedPoints=false, VisibilityTableType *visTable=nullptr, std::vector< int > *newIndexesOfRemainingPoints=nullptr, bool silent=false, cloudViewer::ReferenceCloud *selection=nullptr) override
 
bool removeVisiblePoints (VisibilityTableType *visTable=nullptr, std::vector< int > *newIndexes=nullptr) override
 Removes all the 'visible' points (as defined by the visibility array) More...
 
void enableVisibilityCheck (bool state)
 
bool hasSensor () const
 Returns whether the mesh as an associated sensor or not. More...
 
QSharedPointer< cloudViewer::ReferenceCloudcomputeCPSet (ccGenericPointCloud &otherCloud, cloudViewer::GenericProgressCallback *progressCb=nullptr, unsigned char octreeLevel=0)
 Computes the closest point of this cloud relatively to another cloud. More...
 
bool interpolateColorsFrom (ccGenericPointCloud *cloud, cloudViewer::GenericProgressCallback *progressCb=nullptr, unsigned char octreeLevel=0)
 Interpolate colors from another cloud (nearest neighbor only) More...
 
void setPointColor (size_t pointIndex, const ecvColor::Rgb &col)
 Sets a particular point color. More...
 
void setPointColor (size_t pointIndex, const ecvColor::Rgba &col)
 
void setPointColor (size_t pointIndex, const Eigen::Vector3d &col)
 
void setEigenColor (size_t index, const Eigen::Vector3d &color)
 
void setPointNormalIndex (size_t pointIndex, CompressedNormType norm)
 Sets a particular point compressed normal. More...
 
void setPointNormal (size_t pointIndex, const CCVector3 &N)
 Sets a particular point normal (shortcut) More...
 
void setEigenNormal (size_t index, const Eigen::Vector3d &normal)
 
void addNormIndex (CompressedNormType index)
 Pushes a compressed normal vector. More...
 
void addNorm (const CCVector3 &N)
 Pushes a normal vector on stack (shortcut) More...
 
void addEigenNorm (const Eigen::Vector3d &N)
 
void addEigenNorms (const std::vector< Eigen::Vector3d > &normals)
 
void addNorms (const std::vector< CCVector3 > &Ns)
 
void addNorms (const std::vector< CompressedNormType > &idxes)
 
std::vector< CompressedNormTypegetNorms () const
 
void getNorms (std::vector< CompressedNormType > &idxes) const
 
void addNormAtIndex (const PointCoordinateType *N, unsigned index)
 Adds a normal vector to the one at a specific index. More...
 
void setNormsTable (NormsIndexesTableType *norms)
 Sets the (compressed) normals table. More...
 
bool convertNormalToRGB ()
 Converts normals to RGB colors. More...
 
bool convertNormalToDipDirSFs (ccScalarField *dipSF, ccScalarField *dipDirSF)
 Converts normals to two scalar fields: 'dip' and 'dip direction'. More...
 
void addRGBColor (const ecvColor::Rgb &C)
 Pushes an RGB color on stack. More...
 
void addRGBColors (const std::vector< ecvColor::Rgb > &colors)
 
void addEigenColor (const Eigen::Vector3d &color)
 
void addEigenColors (const std::vector< Eigen::Vector3d > &colors)
 
void addRGBColor (ColorCompType r, ColorCompType g, ColorCompType b)
 Pushes an RGB color on stack (shortcut) More...
 
void addGreyColor (ColorCompType g)
 Pushes a grey color on stack (shortcut) More...
 
bool convertRGBToGreyScale ()
 Converts RGB to grey scale colors. More...
 
bool colorize (float r, float g, float b)
 Multiplies all color components of all points by coefficients. More...
 
bool setRGBColorByHeight (unsigned char heightDim, ccColorScale::Shared colorScale)
 Assigns color to points proportionnaly to their 'height'. More...
 
bool setRGBColorByBanding (unsigned char dim, double freq)
 Assigns color to points by 'banding'. More...
 
bool convertCurrentScalarFieldToColors (bool mixWithExistingColor=false)
 
bool setRGBColorWithCurrentScalarField (bool mixWithExistingColor=false)
 Sets RGB colors with current scalar field (values & parameters) More...
 
bool setRGBColor (ColorCompType r, ColorCompType g, ColorCompType b)
 Set a unique color for the whole cloud (shortcut) More...
 
bool setRGBColor (const ecvColor::Rgb &col)
 Set a unique color for the whole cloud. More...
 
bool applyFilterToRGB (PointCoordinateType sigma, PointCoordinateType sigmaSF, RgbFilterOptions filterParams, cloudViewer::GenericProgressCallback *progressCb=nullptr)
 Applies a spatial Gaussian filter on RGB colors. More...
 
void invertNormals ()
 Inverts normals (if any) More...
 
ccPointCloudfilterPointsByScalarValue (ScalarType minVal, ScalarType maxVal, bool outside=false)
 Filters out points whose scalar values falls into an interval. More...
 
ccPointCloudfilterPointsByScalarValue (std::vector< ScalarType > values, bool outside=false)
 Filters out points whose scalar values falls into an interval. More...
 
void hidePointsByScalarValue (ScalarType minVal, ScalarType maxVal)
 Hides points whose scalar values falls into an interval. More...
 
void hidePointsByScalarValue (std::vector< ScalarType > values)
 Hides points whose scalar values falls into an interval. More...
 
ccPointCloudunroll (UnrollMode mode, UnrollBaseParams *params, bool exportDeviationSF=false, double startAngle_deg=0.0, double stopAngle_deg=360.0, cloudViewer::GenericProgressCallback *progressCb=nullptr) const
 Unrolls the cloud and its normals on a cylinder or a cone. More...
 
void addColorRampInfo (CC_DRAW_CONTEXT &context)
 Adds associated SF color ramp info to current GL context. More...
 
int addScalarField (ccScalarField *sf)
 Adds an existing scalar field to this cloud. More...
 
ColorsTableTypergbColors () const
 Returns pointer on RGB colors table. More...
 
NormsIndexesTableTypenormals () const
 Returns pointer on compressed normals indexes table. More...
 
cloudViewer::ReferenceCloudcrop2D (const ccPolyline *poly, unsigned char orthoDim, bool inside=true)
 Crops the cloud inside (or outside) a 2D polyline. More...
 
const ccPointCloudappend (ccPointCloud *cloud, unsigned pointCountBefore, bool ignoreChildren=false)
 Appends a cloud to this one. More...
 
bool enhanceRGBWithIntensitySF (int sfIdx, bool useCustomIntensityRange=false, double minI=0.0, double maxI=1.0)
 
bool exportCoordToSF (bool exportDims[3])
 Exports the specified coordinate dimension(s) to scalar field(s) More...
 
bool setCoordFromSF (bool importDims[3], cloudViewer::ScalarField *sf, PointCoordinateType defaultValueForNaN)
 Sets coordinate(s) from a scalar field. More...
 
bool exportNormalToSF (bool exportDims[3])
 Exports the specified normal dimension(s) to scalar field(s) More...
 
virtual bool IsEmpty () const override
 
virtual Eigen::Vector3d GetMinBound () const override
 Returns min bounds for geometry coordinates. More...
 
virtual Eigen::Vector3d GetMaxBound () const override
 Returns max bounds for geometry coordinates. More...
 
virtual Eigen::Vector3d GetCenter () const override
 Returns the center of the geometry coordinates. More...
 
virtual ccBBox GetAxisAlignedBoundingBox () const override
 Returns an axis-aligned bounding box of the geometry. More...
 
virtual ecvOrientedBBox GetOrientedBoundingBox () const override
 
virtual ccPointCloudTransform (const Eigen::Matrix4d &trans) override
 Apply transformation (4x4 matrix) to the geometry coordinates. More...
 
virtual ccPointCloudTranslate (const Eigen::Vector3d &translation, bool relative=true) override
 Apply translation to the geometry coordinates. More...
 
ccPointCloudTranslate (const CCVector3 &T)
 
virtual ccPointCloudScale (const double s, const Eigen::Vector3d &center) override
 Apply scaling to the geometry coordinates. Given a scaling factor $s$, and center $c$, a given point $p$ is transformed according to $s (p - c) + c$. More...
 
virtual ccPointCloudRotate (const Eigen::Matrix3d &R, const Eigen::Vector3d &center) override
 Apply rotation to the geometry coordinates and normals. Given a rotation matrix $R$, and center $c$, a given point $p$ is transformed according to $R (p - c) + c$. More...
 
bool HasCovariances () const
 Returns 'true' if the point cloud contains per-point covariance matrix. More...
 
ccPointCloudNormalizeNormals ()
 Normalize point normals to length 1.`. More...
 
std::shared_ptr< ccPointCloudSelectByIndex (const std::vector< size_t > &indices, bool invert=false) const
 Function to select points from input ccPointCloud into output ccPointCloud. More...
 
ccPointCloudRemoveNonFinitePoints (bool remove_nan=true, bool remove_infinite=true)
 Remove all points fromt he point cloud that have a nan entry, or infinite entries. More...
 
std::shared_ptr< ccPointCloudVoxelDownSample (double voxel_size)
 Function to downsample input ccPointCloud into output ccPointCloud with a voxel. More...
 
std::tuple< std::shared_ptr< ccPointCloud >, Eigen::MatrixXi, std::vector< std::vector< int > > > VoxelDownSampleAndTrace (double voxel_size, const Eigen::Vector3d &min_bound, const Eigen::Vector3d &max_bound, bool approximate_class=false) const
 Function to downsample using geometry.ccPointCloud.VoxelDownSample. More...
 
std::shared_ptr< ccPointCloudUniformDownSample (size_t every_k_points) const
 Function to downsample input ccPointCloud into output ccPointCloud uniformly. More...
 
std::shared_ptr< ccPointCloudRandomDownSample (double sampling_ratio) const
 Function to downsample input pointcloud into output pointcloud randomly. More...
 
std::shared_ptr< ccPointCloudFarthestPointDownSample (const size_t num_samples, const size_t start_index=0) const
 Function to downsample input pointcloud into output pointcloud with a set of points has farthest distance. More...
 
std::shared_ptr< ccPointCloudCrop (const ccBBox &bbox) const
 Function to crop ccPointCloud into output ccPointCloud. More...
 
std::shared_ptr< ccPointCloudCrop (const ecvOrientedBBox &bbox) const
 Function to crop ccPointCloud into output ccPointCloud. More...
 
std::tuple< std::shared_ptr< ccPointCloud >, std::vector< size_t > > RemoveRadiusOutliers (size_t nb_points, double search_radius) const
 Function to remove points that have less than nb_points in a sphere of a given radius. More...
 
std::tuple< std::shared_ptr< ccPointCloud >, std::vector< size_t > > RemoveStatisticalOutliers (size_t nb_neighbors, double std_ratio) const
 Function to remove points that are further away from their nb_neighbor neighbors in average. More...
 
bool EstimateNormals (const cloudViewer::geometry::KDTreeSearchParam &search_param=cloudViewer::geometry::KDTreeSearchParamKNN(), bool fast_normal_computation=true)
 Function to compute the normals of a point cloud. More...
 
bool OrientNormalsToAlignWithDirection (const Eigen::Vector3d &orientation_reference=Eigen::Vector3d(0.0, 0.0, 1.0))
 Function to orient the normals of a point cloud. More...
 
bool OrientNormalsTowardsCameraLocation (const Eigen::Vector3d &camera_location=Eigen::Vector3d::Zero())
 Function to orient the normals of a point cloud. More...
 
void OrientNormalsConsistentTangentPlane (size_t k)
 Function to consistently orient estimated normals based on consistent tangent planes as described in Hoppe et al., "Surface Reconstruction from Unorganized Points", 1992. More...
 
std::vector< double > ComputePointCloudDistance (const ccPointCloud &target)
 Function to compute the point to point distances between point clouds. More...
 
void EstimateCovariances (const cloudViewer::geometry::KDTreeSearchParam &search_param=cloudViewer::geometry::KDTreeSearchParamKNN())
 Function to compute the covariance matrix for each point of a point cloud. More...
 
std::vector< double > ComputeMahalanobisDistance () const
 Function to compute the Mahalanobis distance for points in an input point cloud. More...
 
std::vector< double > ComputeNearestNeighborDistance () const
 
double ComputeResolution () const
 
std::tuple< std::shared_ptr< ccMesh >, std::vector< size_t > > ComputeConvexHull () const
 Function that computes the convex hull of the point cloud using qhull. More...
 
std::tuple< std::shared_ptr< ccMesh >, std::vector< size_t > > HiddenPointRemoval (const Eigen::Vector3d &camera_location, const double radius) const
 This is an implementation of the Hidden Point Removal operator described in Katz et. al. 'Direct Visibility of Point Sets', 2007. More...
 
std::vector< int > ClusterDBSCAN (double eps, size_t min_points, bool print_progress=false) const
 Cluster ccPointCloud using the DBSCAN algorithm Ester et al., "A Density-Based Algorithm for Discovering Clusters in Large Spatial Databases with Noise", 1996. More...
 
std::tuple< Eigen::Vector4d, std::vector< size_t > > SegmentPlane (const double distance_threshold=0.01, const int ransac_n=3, const int num_iterations=100) const
 Segment ccPointCloud plane using the RANSAC algorithm. More...
 
std::shared_ptr< ccPointCloudCreateFromVoxelGrid (const cloudViewer::geometry::VoxelGrid &voxel_grid)
 Function to create a PointCloud from a VoxelGrid. More...
 
ccPointCloudPaintUniformColor (const Eigen::Vector3d &color)
 Assigns each vertex in the ccMesh the same color. More...
 
bool initLOD ()
 Intializes the LOD structure. More...
 
void clearLOD ()
 Clears the LOD structure. More...
 
- Public Member Functions inherited from cloudViewer::PointCloudTpl< ccGenericPointCloud >
 PointCloudTpl ()
 Default constructor. More...
 
virtual ~PointCloudTpl ()
 Default destructor. More...
 
unsigned size () const override
 
void forEach (GenericCloud::genericPointAction action) override
 
void getBoundingBox (CCVector3 &bbMin, CCVector3 &bbMax) override
 
void placeIteratorAtBeginning () override
 
const CCVector3getNextPoint () override
 
bool enableScalarField () override
 
bool isScalarFieldEnabled () const override
 
void setPointScalarValue (unsigned pointIndex, ScalarType value) override
 
ScalarType getPointScalarValue (unsigned pointIndex) const override
 
const CCVector3getPoint (unsigned index) const override
 
void getPoint (unsigned index, CCVector3 &P) const override
 
void getPoint (unsigned index, double P[3]) const override
 
CCVector3getPointPtr (size_t index)
 
std::vector< CCVector3 > & getPoints ()
 
const std::vector< CCVector3 > & getPoints () const
 
const CCVector3getPointPersistentPtr (unsigned index) override
 
const CCVector3getPointPersistentPtr (unsigned index) const
 
void reset ()
 Clears the cloud database. More...
 
void addPoint (const CCVector3 &P)
 Adds a 3D point to the database. More...
 
void addPoint (double x, double y, double z)
 
void addPoint (double xyz[3])
 
void setPoint (size_t index, const CCVector3 &P)
 
void setEigenPoint (size_t index, const Eigen::Vector3d &point)
 
void addEigenPoint (const Eigen::Vector3d &point)
 
void addPoints (const std::vector< CCVector3 > &points)
 
void addPoints (const std::vector< Eigen::Vector3d > &points)
 
Eigen::Vector3d getEigenPoint (size_t index) const
 
std::vector< Eigen::Vector3d > getEigenPoints () const
 
void setEigenPoints (const std::vector< Eigen::Vector3d > &points)
 
unsigned getNumberOfScalarFields () const
 Returns the number of associated (and active) scalar fields. More...
 
ScalarFieldgetScalarField (int index) const
 Returns a pointer to a specific scalar field. More...
 
const char * getScalarFieldName (int index) const
 Returns the name of a specific scalar field. More...
 
int getScalarFieldIndexByName (const char *name) const
 Returns the index of a scalar field represented by its name. More...
 
ScalarFieldgetCurrentInScalarField () const
 Returns the scalar field currently associated to the cloud input. More...
 
ScalarFieldgetCurrentOutScalarField () const
 Returns the scalar field currently associated to the cloud output. More...
 
void setCurrentInScalarField (int index)
 Sets the INPUT scalar field. More...
 
int getCurrentInScalarFieldIndex ()
 Returns current INPUT scalar field index (or -1 if none) More...
 
void setCurrentOutScalarField (int index)
 Sets the OUTPUT scalar field. More...
 
int getCurrentOutScalarFieldIndex ()
 Returns current OUTPUT scalar field index (or -1 if none) More...
 
void setCurrentScalarField (int index)
 Sets both the INPUT & OUTPUT scalar field. More...
 
bool renameScalarField (int index, const char *newName)
 Renames a specific scalar field. More...
 
unsigned capacity () const
 Returns cloud capacity (i.e. reserved size) More...
 
- Public Member Functions inherited from ccGenericPointCloud
 ccGenericPointCloud (QString name=QString())
 Default constructor. More...
 
 ccGenericPointCloud (const ccGenericPointCloud &cloud)
 Copy constructor. More...
 
 ~ccGenericPointCloud () override
 Default destructor. More...
 
virtual ccOctree::Shared computeOctree (cloudViewer::GenericProgressCallback *progressCb=nullptr, bool autoAddChild=true)
 Computes the cloud octree. More...
 
virtual ccOctree::Shared getOctree () const
 Returns the associated octree (if any) More...
 
virtual void setOctree (ccOctree::Shared octree, bool autoAddChild=true)
 Sets the associated octree. More...
 
virtual ccOctreeProxygetOctreeProxy () const
 Returns the associated octree proxy (if any) More...
 
virtual void deleteOctree ()
 Erases the octree. More...
 
virtual VisibilityTableTypegetTheVisibilityArray ()
 Returns associated visibility array. More...
 
virtual const VisibilityTableTypegetTheVisibilityArray () const
 Returns associated visibility array (const version) More...
 
virtual cloudViewer::ReferenceCloudgetTheVisiblePoints (const VisibilityTableType *visTable=nullptr, bool silent=false, cloudViewer::ReferenceCloud *selection=nullptr) const
 Returns a ReferenceCloud equivalent to the visibility array. More...
 
virtual bool isVisibilityTableInstantiated () const
 Returns whether the visibility array is allocated or not. More...
 
virtual bool resetVisibilityArray ()
 Resets the associated visibility array. More...
 
virtual void invertVisibilityArray ()
 Inverts the visibility array. More...
 
virtual void unallocateVisibilityArray ()
 Erases the points visibility information. More...
 
ccBBox getOwnBB (bool withGLFeatures=false) override
 Returns the entity's own bounding-box. More...
 
bool isSerializable () const override
 Returns whether object is serializable of not. More...
 
void setPointSize (unsigned size=0)
 Sets point size. More...
 
unsigned char getPointSize () const
 Returns current point size. More...
 
void importParametersFrom (const ccGenericPointCloud *cloud)
 Imports the parameters from another cloud. More...
 
bool pointPicking (const CCVector2d &clickPos, const ccGLCameraParameters &camera, int &nearestPointIndex, double &nearestSquareDist, double pickWidth=2.0, double pickHeight=2.0, bool autoComputeOctree=false)
 Point picking (brute force or octree-driven) More...
 
std::tuple< Eigen::Vector3d, Eigen::Matrix3d > computeMeanAndCovariance () const
 
cloudViewer::SquareMatrixd computeCovariance () const
 
- Public Member Functions inherited from ccShiftedObject
 ccShiftedObject (QString name=QString())
 Default constructor. More...
 
 ccShiftedObject (const ccShiftedObject &s)
 Copy constructor. More...
 
void copyGlobalShiftAndScale (const ccShiftedObject &s)
 Copies the Global Shift and Scale from another entity. More...
 
virtual void setGlobalShift (double x, double y, double z)
 Sets shift applied to original coordinates (information storage only) More...
 
virtual void setGlobalShift (const CCVector3d &shift)
 Sets shift applied to original coordinates (information storage only) More...
 
virtual const CCVector3dgetGlobalShift () const
 Returns the shift applied to original coordinates. More...
 
virtual void setGlobalScale (double scale)
 
virtual double getGlobalScale () const
 Returns the scale applied to original coordinates. More...
 
bool isShifted () const
 Returns whether the cloud is shifted or not. More...
 
template<typename T >
CCVector3d toGlobal3d (const Vector3Tpl< T > &Plocal) const
 Returns the point back-projected into the original coordinates system. More...
 
template<typename T >
CCVector3d toLocal3d (const Vector3Tpl< T > &Pglobal) const
 Returns the point projected into the local (shifted) coordinates system. More...
 
template<typename T >
CCVector3 toLocal3pc (const Vector3Tpl< T > &Pglobal) const
 Returns the point projected into the local (shifted) coordinates system. More...
 
bool getOwnGlobalBB (CCVector3d &minCorner, CCVector3d &maxCorner) override
 
GlobalBoundingBox getOwnGlobalBB (bool withGLFeatures=false) override
 
- Public Member Functions inherited from ccHObject
 ccHObject (QString name=QString())
 Default constructor. More...
 
 ccHObject (const ccHObject &object)
 Copy constructor. More...
 
virtual ~ccHObject () override
 Default destructor. More...
 
virtual Eigen::Vector2d GetMin2DBound () const
 
virtual Eigen::Vector2d GetMax2DBound () const
 
virtual ccHObjectScale (const double s)
 
virtual ccHObjectRotate (const Eigen::Matrix3d &R)
 
QString getViewId () const
 
bool isGroup () const
 Returns whether the instance is a group. More...
 
ccHObjectgetParent () const
 Returns parent object. More...
 
virtual QIcon getIcon () const
 Returns the icon associated to this entity. More...
 
void addDependency (ccHObject *otherObject, int flags, bool additive=true)
 Adds a new dependence (additive or not) More...
 
int getDependencyFlagsWith (const ccHObject *otherObject)
 Returns the dependency flags with a given object. More...
 
void removeDependencyWith (ccHObject *otherObject)
 Removes any dependency flags with a given object. More...
 
void removeDependencyFlag (ccHObject *otherObject, DEPENDENCY_FLAGS flag)
 Removes a given dependency flag. More...
 
virtual bool addChild (ccHObject *child, int dependencyFlags=DP_PARENT_OF_OTHER, int insertIndex=-1)
 Adds a child. More...
 
unsigned getChildrenNumber () const
 Returns the number of children. More...
 
unsigned int getChildCountRecursive () const
 Returns the total number of children under this object recursively. More...
 
ccHObjectgetChild (unsigned childPos) const
 Returns the ith child. More...
 
ccHObjectfind (unsigned uniqueID)
 Finds an entity in this object hierarchy. More...
 
unsigned filterChildren (Container &filteredChildren, bool recursive=false, CV_CLASS_ENUM filter=CV_TYPES::OBJECT, bool strict=false) const
 Collects the children corresponding to a certain pattern. More...
 
void detachChild (ccHObject *child)
 Detaches a specific child. More...
 
void detachAllChildren ()
 Removes a specific child. More...
 
void getTypeID_recursive (std::vector< removeInfo > &rmInfos, bool relative)
 
void getTypeID_recursive (std::vector< hideInfo > &hdInfos, bool relative)
 
void removeChild (ccHObject *child)
 
void removeChild (int pos)
 Removes a specific child given its index. More...
 
void removeAllChildren ()
 Removes all children. More...
 
int getChildIndex (const ccHObject *aChild) const
 Returns child index. More...
 
void swapChildren (unsigned firstChildIndex, unsigned secondChildIndex)
 Swaps two children. More...
 
int getIndex () const
 Returns index relatively to its parent or -1 if no parent. More...
 
void transferChild (ccHObject *child, ccHObject &newParent)
 Transfer a given child to another parent. More...
 
void transferChildren (ccHObject &newParent, bool forceFatherDependent=false)
 Transfer all children to another parent. More...
 
ccHObjectgetFirstChild () const
 Shortcut: returns first child. More...
 
ccHObjectgetLastChild () const
 Shortcut: returns last child. More...
 
bool isAncestorOf (const ccHObject *anObject) const
 Returns true if the current object is an ancestor of the specified one. More...
 
void removeFromRenderScreen (bool recursive=true)
 
void hideObject_recursive (bool recursive)
 
void hideBB (CC_DRAW_CONTEXT context)
 
void showBB (CC_DRAW_CONTEXT context)
 
void setRedrawFlagRecursive (bool redraw=false)
 
void setForceRedrawRecursive (bool redraw=false)
 
void setPointSizeRecursive (int pSize)
 
void setLineWidthRecursive (PointCoordinateType width)
 
virtual ccBBox getBB_recursive (bool withGLFeatures=false, bool onlyEnabledChildren=true)
 Returns the bounding-box of this entity and it's children. More...
 
virtual GlobalBoundingBox getGlobalBB_recursive (bool withGLFeatures=false, bool onlyEnabledChildren=true)
 Returns the global bounding-box of this entity and it's children. More...
 
virtual ccBBox getDisplayBB_recursive (bool relative)
 Returns the bounding-box of this entity and it's children WHEN DISPLAYED. More...
 
virtual ccBBox getOwnFitBB (ccGLMatrix &trans)
 Returns best-fit bounding-box (if available) More...
 
virtual void drawBB (CC_DRAW_CONTEXT &context, const ecvColor::Rgb &col)
 Draws the entity (and its children) bounding-box. More...
 
void draw (CC_DRAW_CONTEXT &context) override
 Draws entity and its children. More...
 
void updateNameIn3DRecursive ()
 
void setHideShowType (CC_DRAW_CONTEXT &context)
 
void setRemoveType (CC_DRAW_CONTEXT &context)
 
ENTITY_TYPE getEntityType () const
 
virtual void redrawDisplay (bool forceRedraw=true, bool only2D=false)
 Redraws associated display. More...
 
bool getAbsoluteGLTransformation (ccGLMatrix &trans) const
 
virtual bool isDisplayed () const
 Returns whether the object is actually displayed (visible) or not. More...
 
virtual bool isBranchEnabled () const
 Returns whether the object and all its ancestors are enabled. More...
 
virtual void redrawDisplay_recursive (bool p)
 
virtual void refreshDisplay_recursive (bool p)
 
virtual void setSelected_recursive (bool p)
 
virtual void toggleActivation_recursive ()
 
virtual void toggleVisibility_recursive ()
 
virtual void toggleColors_recursive ()
 
virtual void resetGLTransformationHistory_recursive ()
 
virtual void toggleNormals_recursive ()
 
virtual void toggleSF_recursive ()
 
virtual void toggleShowName_recursive ()
 
unsigned findMaxUniqueID_recursive () const
 Returns the max 'unique ID' of this entity and its siblings. More...
 
void applyGLTransformation_recursive (const ccGLMatrix *trans=nullptr)
 Applies the active OpenGL transformation to the entity (recursive) More...
 
bool isSerializable () const override
 Returns whether object is serializable of not. More...
 
bool toFile (QFile &out, short dataVersion) const override
 Saves data to binary stream. More...
 
bool fromFile (QFile &in, short dataVersion, int flags, LoadedIDMap &oldToNewIDMap) override
 Loads data from binary stream. More...
 
short minimumFileVersion () const override
 Returns the minimum file version required to save this instance. More...
 
bool fromFileNoChildren (QFile &in, short dataVersion, int flags, LoadedIDMap &oldToNewIDMap)
 Custom version of ccSerializableObject::fromFile. More...
 
virtual bool isShareable () const
 Returns whether object is shareable or not. More...
 
virtual void setSelectionBehavior (SelectionBehavior mode)
 Sets selection behavior (when displayed) More...
 
virtual SelectionBehavior getSelectionBehavior () const
 Returns selection behavior. More...
 
virtual const ccGLMatrixgetGLTransformationHistory () const
 Returns the transformation 'history' matrix. More...
 
virtual void setGLTransformationHistory (const ccGLMatrix &mat)
 Sets the transformation 'history' matrix (handle with care!) More...
 
virtual void resetGLTransformationHistory ()
 Resets the transformation 'history' matrix. More...
 
bool pushDisplayState () override
 Pushes the current display state (overridden) More...
 
void popDisplayState (bool apply=true) override
 Pops the last pushed display state (overridden) More...
 
- Public Member Functions inherited from ccObject
 ccObject (QString name=QString())
 Default constructor. More...
 
 ccObject (const ccObject &object)
 Copy constructor. More...
 
virtual QString getName () const
 Returns object name. More...
 
virtual void setName (const QString &name)
 Sets object name. More...
 
virtual void setRemoveFlag (bool removeFlag)
 Sets removeFlag. More...
 
virtual bool getRemoveFlag ()
 Returns removeFlag. More...
 
virtual unsigned getUniqueID () const
 Returns object unique ID. More...
 
virtual void setUniqueID (unsigned ID)
 Changes unique ID. More...
 
virtual bool isEnabled () const
 Returns whether the object is enabled or not. More...
 
virtual void setEnabled (bool state)
 Sets the "enabled" property. More...
 
virtual void toggleActivation ()
 Toggles the "enabled" property. More...
 
virtual bool isLocked () const
 Returns whether the object is locked or not. More...
 
virtual void setLocked (bool state)
 Sets the "enabled" property. More...
 
bool isLeaf () const
 
bool isCustom () const
 
bool isHierarchy () const
 
bool isKindOf (CV_CLASS_ENUM type) const
 
bool isA (CV_CLASS_ENUM type) const
 
QVariant getMetaData (const QString &key) const
 Returns a given associated meta data. More...
 
bool removeMetaData (const QString &key)
 Removes a given associated meta-data. More...
 
void setMetaData (const QString &key, const QVariant &data)
 Sets a meta-data element. More...
 
void setMetaData (const QVariantMap &dataset, bool overwrite=false)
 Sets several meta-data elements at a time. More...
 
bool hasMetaData (const QString &key) const
 Returns whether a meta-data element with the given key exists or not. More...
 
const QVariantMap & metaData () const
 Returns meta-data map (const only) More...
 
void setBaseName (const QString &baseName)
 
QString getBaseName () const
 
void setFullPath (const QString &fullPaht)
 
QString getFullPath () const
 
- Public Member Functions inherited from ccSerializableObject
virtual ~ccSerializableObject ()=default
 Destructor. More...
 
- Public Member Functions inherited from ccDrawableObject
 ccDrawableObject ()
 Default constructor. More...
 
 ccDrawableObject (const ccDrawableObject &object)
 Copy constructor. More...
 
virtual ~ccDrawableObject ()=default
 
virtual bool isVisible () const
 Returns whether entity is visible or not. More...
 
virtual void setVisible (bool state)
 Sets entity visibility. More...
 
virtual void toggleVisibility ()
 Toggles visibility. More...
 
virtual bool isRedraw () const
 Returns whether entity is to be redraw. More...
 
virtual void setRedraw (bool state)
 Sets entity redraw mode. More...
 
virtual void setForceRedraw (bool state)
 Sets force redraw. More...
 
virtual void setFixedId (bool state)
 
virtual bool isFixedId ()
 
virtual bool isVisibilityLocked () const
 Returns whether visibility is locked or not. More...
 
virtual void lockVisibility (bool state)
 Locks/unlocks visibility. More...
 
virtual bool isSelected () const
 Returns whether entity is selected or not. More...
 
virtual void setSelected (bool state)
 Selects/Unselects entity. More...
 
virtual bool colorsShown () const
 Returns whether colors are shown or not. More...
 
virtual void showColors (bool state)
 Sets colors visibility. More...
 
virtual void toggleColors ()
 Toggles colors display state. More...
 
virtual bool normalsShown () const
 Returns whether normals are shown or not. More...
 
virtual void showNormals (bool state)
 Sets normals visibility. More...
 
virtual void toggleNormals ()
 Toggles normals display state. More...
 
virtual void showSF (bool state)
 Sets active scalarfield visibility. More...
 
virtual void toggleSF ()
 Toggles SF display state. More...
 
virtual bool sfShown () const
 Returns whether active scalar field is visible. More...
 
virtual void toggleMaterials ()
 Toggles material display state. More...
 
virtual void showNameIn3D (bool state)
 Sets whether name should be displayed in 3D. More...
 
virtual bool nameShownIn3D () const
 Returns whether name is displayed in 3D or not. More...
 
virtual void toggleShowName ()
 Toggles name in 3D display state. More...
 
virtual bool isColorOverridden () const
 
virtual const ecvColor::RgbgetTempColor () const
 Returns current temporary (unique) color. More...
 
virtual void setTempColor (const ecvColor::Rgb &col, bool autoActivate=true)
 Sets current temporary (unique) More...
 
virtual void enableTempColor (bool state)
 Set temporary color activation state. More...
 
virtual float getOpacity () const
 
virtual void setOpacity (float opacity)
 Set opacity activation state. More...
 
virtual void setGLTransformation (const ccGLMatrix &trans)
 Associates entity with a GL transformation (rotation + translation) More...
 
virtual void enableGLTransformation (bool state)
 Enables/disables associated GL transformation. More...
 
virtual bool isGLTransEnabled () const
 Returns whether a GL transformation is enabled or not. More...
 
virtual const ccGLMatrixgetGLTransformation () const
 Returns associated GL transformation. More...
 
virtual void resetGLTransformation ()
 Resets associated GL transformation. More...
 
virtual void rotateGL (const ccGLMatrix &rotMat)
 Multiplies (left) current GL transformation by a rotation matrix. More...
 
virtual void translateGL (const CCVector3 &trans)
 Translates current GL transformation by a rotation matrix. More...
 
virtual void removeAllClipPlanes ()
 Removes all clipping planes (if any) More...
 
virtual bool addClipPlanes (const ccClipPlane &plane)
 Registers a new clipping plane. More...
 
virtual void toggleClipPlanes (CC_DRAW_CONTEXT &context, bool enable)
 Enables or disables clipping planes (OpenGL) More...
 
virtual void applyDisplayState (const DisplayState &state)
 Applies a display state. 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...
 
- Public Member Functions inherited from cloudViewer::GenericCloud
 GenericCloud ()=default
 Default constructor. More...
 
virtual ~GenericCloud ()=default
 Default destructor. More...
 
virtual bool hasPoints () const
 

Static Public Member Functions

static ccPointCloudFrom (const cloudViewer::GenericIndexedCloud *cloud, const ccGenericPointCloud *sourceCloud=nullptr)
 Creates a new point cloud object from a GenericIndexedCloud. More...
 
static ccPointCloudFrom (cloudViewer::GenericCloud *cloud, const ccGenericPointCloud *sourceCloud=nullptr)
 Creates a new point cloud object from a GenericCloud. More...
 
static ccPointCloudFrom (const ccPointCloud *sourceCloud, const std::vector< size_t > &indices, bool invert=false)
 Function to select points from input ccPointCloud into output ccPointCloud. More...
 
static std::vector< Eigen::Matrix3d > EstimatePerPointCovariances (const ccPointCloud &input, const cloudViewer::geometry::KDTreeSearchParam &search_param=cloudViewer::geometry::KDTreeSearchParamKNN())
 Static function to compute the covariance matrix for each point of a point cloud. Doesn't change the input PointCloud, just outputs the covariance matrices. More...
 
static std::shared_ptr< ccPointCloudCreateFromDepthImage (const cloudViewer::geometry::Image &depth, const cloudViewer::camera::PinholeCameraIntrinsic &intrinsic, const Eigen::Matrix4d &extrinsic=Eigen::Matrix4d::Identity(), double depth_scale=1000.0, double depth_trunc=1000.0, int stride=1, bool project_valid_depth_only=true)
 Factory function to create a pointcloud from a depth image and a camera model. More...
 
static std::shared_ptr< ccPointCloudCreateFromRGBDImage (const cloudViewer::geometry::RGBDImage &image, const cloudViewer::camera::PinholeCameraIntrinsic &intrinsic, const Eigen::Matrix4d &extrinsic=Eigen::Matrix4d::Identity(), bool project_valid_depth_only=true)
 Factory function to create a pointcloud from an RGB-D image and a camera model. More...
 
- Static Public Member Functions inherited from ccHObject
static ccHObjectNew (CV_CLASS_ENUM objectType, const char *name=nullptr)
 Static factory. More...
 
static ccHObjectNew (const QString &pluginId, const QString &classId, const char *name=nullptr)
 Static factory (version to be used by external plugin factories) More...
 
static Eigen::Vector3d ComputeMinBound (const std::vector< Eigen::Vector3d > &points)
 Compute min bound of a list points. More...
 
static Eigen::Vector3d ComputeMaxBound (const std::vector< Eigen::Vector3d > &points)
 Compute max bound of a list points. More...
 
static Eigen::Vector3d ComputeCenter (const std::vector< Eigen::Vector3d > &points)
 Computer center of a list of points. More...
 
static void ResizeAndPaintUniformColor (std::vector< Eigen::Vector3d > &colors, std::size_t size, const Eigen::Vector3d &color)
 Resizes the colors vector and paints a uniform color. More...
 
static void TransformPoints (const Eigen::Matrix4d &transformation, std::vector< Eigen::Vector3d > &points)
 Transforms all points with the transformation matrix. More...
 
static void TransformNormals (const Eigen::Matrix4d &transformation, std::vector< Eigen::Vector3d > &normals)
 Transforms the normals with the transformation matrix. More...
 
static void TransformCovariances (const Eigen::Matrix4d &transformation, std::vector< Eigen::Matrix3d > &covariances)
 Transforms all covariance matrices with the transformation. More...
 
static void TranslatePoints (const Eigen::Vector3d &translation, std::vector< Eigen::Vector3d > &points, bool relative)
 Apply translation to the geometry coordinates. More...
 
static void ScalePoints (const double scale, std::vector< Eigen::Vector3d > &points, const Eigen::Vector3d &center)
 Scale the coordinates of all points by the scaling factor scale. More...
 
static void RotatePoints (const Eigen::Matrix3d &R, std::vector< Eigen::Vector3d > &points, const Eigen::Vector3d &center)
 Rotate all points with the rotation matrix R. More...
 
static void RotateNormals (const Eigen::Matrix3d &R, std::vector< Eigen::Vector3d > &normals)
 Rotate all normals with the rotation matrix R. More...
 
static void RotateCovariances (const Eigen::Matrix3d &R, std::vector< Eigen::Matrix3d > &covariances)
 Rotate all covariance matrices with the rotation matrix R. More...
 
static Eigen::Matrix3d GetRotationMatrixFromXYZ (const Eigen::Vector3d &rotation)
 Get Rotation Matrix from XYZ RotationType. More...
 
static Eigen::Matrix3d GetRotationMatrixFromYZX (const Eigen::Vector3d &rotation)
 Get Rotation Matrix from YZX RotationType. More...
 
static Eigen::Matrix3d GetRotationMatrixFromZXY (const Eigen::Vector3d &rotation)
 Get Rotation Matrix from ZXY RotationType. More...
 
static Eigen::Matrix3d GetRotationMatrixFromXZY (const Eigen::Vector3d &rotation)
 Get Rotation Matrix from XZY RotationType. More...
 
static Eigen::Matrix3d GetRotationMatrixFromZYX (const Eigen::Vector3d &rotation)
 Get Rotation Matrix from ZYX RotationType. More...
 
static Eigen::Matrix3d GetRotationMatrixFromYXZ (const Eigen::Vector3d &rotation)
 Get Rotation Matrix from YXZ RotationType. More...
 
static Eigen::Matrix3d GetRotationMatrixFromAxisAngle (const Eigen::Vector3d &rotation)
 Get Rotation Matrix from AxisAngle RotationType. More...
 
static Eigen::Matrix3d GetRotationMatrixFromQuaternion (const Eigen::Vector4d &rotation)
 Get Rotation Matrix from Quaternion. More...
 
static Eigen::Matrix3d GetRotationMatrixFromEulerAngle (const Eigen::Vector3d &rotation)
 Get Rotation Matrix from Euler angle. More...
 
- Static Public Member Functions inherited from ccObject
static unsigned GetCurrentDBVersion ()
 Returns current database version. More...
 
static void SetUniqueIDGenerator (ccUniqueIDGenerator::Shared generator)
 Sets the unique ID generator. More...
 
static ccUniqueIDGenerator::Shared GetUniqueIDGenerator ()
 Returns the unique ID generator. More...
 
static unsigned GetNextUniqueID ()
 Returns a new unassigned unique ID. More...
 
static unsigned GetLastUniqueID ()
 Returns last assigned unique ID. More...
 
static CV_CLASS_ENUM ReadClassIDFromFile (QFile &in, short dataVersion)
 Helper: reads out class ID from a binary stream. More...
 
- Static Public Member Functions inherited from ccSerializableObject
static bool WriteError ()
 Sends a custom error message (write error) and returns 'false'. More...
 
static bool ReadError ()
 Sends a custom error message (read error) and returns 'false'. More...
 
static bool MemoryError ()
 Sends a custom error message (not enough memory) and returns 'false'. More...
 
static bool CorruptError ()
 Sends a custom error message (corrupted file) and returns 'false'. More...
 

Public Attributes

std::vector< Eigen::Matrix3d > covariances_
 Covariance Matrix for each point. More...
 

Protected Member Functions

void drawMeOnly (CC_DRAW_CONTEXT &context) override
 Draws the entity only (not its children) More...
 
void applyGLTransformation (const ccGLMatrix &trans) override
 Applies a GL transformation to the entity. More...
 
bool toFile_MeOnly (QFile &out, short dataVersion) const override
 Save own object data. More...
 
short minimumFileVersion_MeOnly () const override
 
bool fromFile_MeOnly (QFile &in, short dataVersion, int flags, LoadedIDMap &oldToNewIDMap) override
 Loads own object data. More...
 
void notifyGeometryUpdate () override
 
void swapPoints (unsigned firstIndex, unsigned secondIndex) override
 
virtual void removePoints (size_t index) override
 
void releaseVBOs ()
 Release VBOs. More...
 
- Protected Member Functions inherited from cloudViewer::PointCloudTpl< ccGenericPointCloud >
CCVector3point (unsigned index)
 Returns non const access to a given point. More...
 
const CCVector3point (unsigned index) const
 Returns const access to a given point. More...
 
- Protected Member Functions inherited from ccShiftedObject
bool saveShiftInfoToFile (QFile &out) const
 Serialization helper (output) More...
 
bool loadShiftInfoFromFile (QFile &in)
 Serialization helper (input) More...
 
- Protected Member Functions inherited from ccHObject
virtual void setParent (ccHObject *anObject)
 Sets parent object. More...
 
virtual void drawNameIn3D ()
 Draws the entity name in 3D. More...
 
virtual void onDeletionOf (const ccHObject *obj)
 This method is called when another object is deleted. More...
 
virtual void onUpdateOf (ccHObject *obj)
 This method is called when another object (geometry) is updated. More...
 
- Protected Member Functions inherited from ccObject
virtual bool getFlagState (CV_OBJECT_FLAG flag) const
 Returns flag state. More...
 
virtual void setFlagState (CV_OBJECT_FLAG flag, bool state)
 Sets flag state. More...
 
bool toFile (QFile &out, short dataVersion) const override
 Saves data to binary stream. More...
 
short minimumFileVersion () const override
 Returns the minimum file version required to save this instance. More...
 
bool fromFile (QFile &in, short dataVersion, int flags, LoadedIDMap &oldToNewIDMap) override
 Reimplemented from ccSerializableObject::fromFile. More...
 

Protected Attributes

ColorsTableTypem_rgbColors
 Colors. More...
 
NormsIndexesTableTypem_normals
 Normals (compressed) More...
 
bool m_sfColorScaleDisplayed
 
ccScalarFieldm_currentDisplayedScalarField
 Currently displayed scalar field. More...
 
int m_currentDisplayedScalarFieldIndex
 Currently displayed scalar field index. More...
 
std::vector< Grid::Sharedm_grids
 Associated grid structure. More...
 
bool m_visibilityCheckEnabled
 Whether visibility check is available or not (during comparison) More...
 
vboSet m_vboManager
 Set of VBOs attached to this cloud. More...
 
ccPointCloudLODm_lod
 L.O.D. structure. More...
 
FWFDescriptorSet m_fwfDescriptors
 General waveform descriptors. More...
 
std::vector< ccWaveformm_fwfWaveforms
 Per-point waveform accessors. More...
 
SharedFWFDataContainer m_fwfData
 Waveforms raw data storage. More...
 
- Protected Attributes inherited from cloudViewer::PointCloudTpl< ccGenericPointCloud >
std::vector< CCVector3m_points
 3D Points database More...
 
BoundingBox m_bbox
 Bounding-box. More...
 
unsigned m_currentPointIndex
 'Iterator' on the points db More...
 
std::vector< ScalarField * > m_scalarFields
 Associated scalar fields. More...
 
int m_currentInScalarFieldIndex
 Index of current scalar field used for input. More...
 
int m_currentOutScalarFieldIndex
 Index of current scalar field used for output. More...
 
- Protected Attributes inherited from ccGenericPointCloud
VisibilityTableType m_pointsVisibility
 Per-point visibility table. More...
 
unsigned char m_pointSize
 Point size (won't be applied if 0) More...
 
- Protected Attributes inherited from ccShiftedObject
CCVector3d m_globalShift
 Global shift (typically applied at loading time) More...
 
double m_globalScale
 Global scale (typically applied at loading time) More...
 
- Protected Attributes inherited from ccHObject
ccHObjectm_parent
 Parent. More...
 
Container m_children
 Children. More...
 
SelectionBehavior m_selectionBehavior
 Selection behavior. More...
 
std::map< ccHObject *, int > m_dependencies
 Dependencies map. More...
 
ccGLMatrix m_glTransHistory
 Cumulative GL transformation. More...
 
bool m_isDeleting
 Flag to safely handle dependencies when the object is being deleted. More...
 
- Protected Attributes inherited from ccObject
QString m_name
 Object name. More...
 
QString m_baseName
 
QString m_filePath
 
bool m_removeFlag
 
unsigned m_flags
 Object flags. More...
 
QVariantMap m_metaData
 Associated meta-data. More...
 
- Protected Attributes inherited from ccDrawableObject
bool m_fixedId
 
bool m_modelRedraw
 
bool m_forceRedraw
 
float m_opacity
 
bool m_visible
 Specifies whether the object is visible or not. More...
 
bool m_selected
 Specifies whether the object is selected or not. More...
 
bool m_lockedVisibility
 Specifies whether the visibility can be changed by user or not. More...
 
bool m_colorsDisplayed
 Specifies whether colors should be displayed. More...
 
bool m_normalsDisplayed
 Specifies whether normals should be displayed. More...
 
bool m_sfDisplayed
 Specifies whether scalar field should be displayed. More...
 
ecvColor::Rgb m_tempColor
 Temporary (unique) color. More...
 
bool m_colorIsOverridden
 Temporary (unique) color activation state. More...
 
ccGLMatrix m_glTrans
 Current GL transformation. More...
 
bool m_glTransEnabled
 Current GL transformation activation state. More...
 
bool m_showNameIn3D
 Whether name is displayed in 3D or not. More...
 
CCVector3d m_nameIn3DPos
 Last 2D position of the '3D' name. More...
 
ccClipPlaneSet m_clipPlanes
 Active clipping planes (used for display only) More...
 
std::vector< DisplayState::Sharedm_displayStateStack
 The stack of pushed display states. More...
 

Detailed Description

A 3D cloud and its associated features (color, normals, scalar fields, etc.)

A point cloud can have multiple features:

  • colors (RGB)
  • normals (compressed)
  • scalar fields
  • an octree strucutre
  • per-point visibility information (to hide/display subsets of points)
  • other children objects (meshes, calibrated pictures, etc.)

Definition at line 146 of file ecvPointCloud.h.

Member Typedef Documentation

◆ BaseClass

Base class (shortcut)

Definition at line 150 of file ecvPointCloud.h.

◆ FWFDataContainer

using ccPointCloud::FWFDataContainer = std::vector<uint8_t>

Waveform data container.

Definition at line 506 of file ecvPointCloud.h.

◆ FWFDescriptorSet

Waveform descriptors set.

Definition at line 503 of file ecvPointCloud.h.

◆ SharedFWFDataContainer

Definition at line 507 of file ecvPointCloud.h.

Member Enumeration Documentation

◆ CLONE_WARNINGS

Warnings for the partialClone method (bit flags)

Enumerator
WRN_OUT_OF_MEM_FOR_COLORS 
WRN_OUT_OF_MEM_FOR_NORMALS 
WRN_OUT_OF_MEM_FOR_SFS 
WRN_OUT_OF_MEM_FOR_FWF 

Definition at line 208 of file ecvPointCloud.h.

◆ RGB_FILTER_TYPES

RGB filter types.

Enumerator
NONE 
BILATERAL 
GAUSSIAN 
MEAN 
MEDIAN 

Definition at line 790 of file ecvPointCloud.h.

◆ UnrollMode

Enumerator
CYLINDER 
CONE 
STRAIGHTENED_CONE 
STRAIGHTENED_CONE2 

Definition at line 864 of file ecvPointCloud.h.

Constructor & Destructor Documentation

◆ ccPointCloud() [1/3]

ccPointCloud::ccPointCloud ( QString  name = QString())
throw (
)

Default constructor.

Creates an empty cloud without any feature. Each of them shoud be specifically instantiated/created (once the points have been added to this cloud, at least partially).

Parameters
namecloud name (optional)

Definition at line 55 of file ecvPointCloud.cpp.

References name.

Referenced by cloneThis(), From(), and partialClone().

◆ ccPointCloud() [2/3]

ccPointCloud::ccPointCloud ( const ccPointCloud cloud)

Definition at line 70 of file ecvPointCloud.cpp.

◆ ccPointCloud() [3/3]

ccPointCloud::ccPointCloud ( const std::vector< Eigen::Vector3d > &  points,
const std::string &  name = "cloud" 
)

◆ ~ccPointCloud()

ccPointCloud::~ccPointCloud ( )
override

Default destructor.

Definition at line 528 of file ecvPointCloud.cpp.

References clear().

Member Function Documentation

◆ addColorRampInfo()

void ccPointCloud::addColorRampInfo ( CC_DRAW_CONTEXT context)

Adds associated SF color ramp info to current GL context.

Definition at line 2945 of file ecvPointCloud.cpp.

References context, getCurrentDisplayedScalarFieldIndex(), and cloudViewer::PointCloudTpl< ccGenericPointCloud >::getScalarField().

Referenced by drawMeOnly(), and ccGenericMesh::handleColorRamp().

◆ addEigenColor()

◆ addEigenColors()

void ccPointCloud::addEigenColors ( const std::vector< Eigen::Vector3d > &  colors)

◆ addEigenNorm()

◆ addEigenNorms()

◆ addGreyColor()

void ccPointCloud::addGreyColor ( ColorCompType  g)
inline

Pushes a grey color on stack (shortcut)

Shortcut: color is converted to RGB(g, g, g)

Parameters
ggrey component

Definition at line 722 of file ecvPointCloud.h.

Referenced by grey_cb(), and SoiFilter::loadFile().

◆ addGrid()

bool ccPointCloud::addGrid ( Grid::Shared  grid)
inline

Adds an associated grid.

Definition at line 449 of file ecvPointCloud.h.

Referenced by append(), and PTXFilter::loadFile().

◆ addNorm()

◆ addNormAtIndex()

void ccPointCloud::addNormAtIndex ( const PointCoordinateType N,
unsigned  index 
)

Adds a normal vector to the one at a specific index.

The resulting sum is automatically normalized and compressed.

Parameters
Nnormal vector to add (size: 3)
indexnormal index to modify

Definition at line 1816 of file ecvPointCloud.cpp.

References ccNormalVectors::GetNormal(), ccNormalVectors::GetNormIndex(), ccArray< Type, N, ComponentType >::getValue(), hasNormals(), m_normals, Vector3Tpl< Type >::normalize(), normalsHaveChanged(), reserveTheNormsTable(), ccArray< Type, N, ComponentType >::setValue(), Tuple3Tpl< Type >::u, and Vector3Tpl< PointCoordinateType >::vadd().

◆ addNormIndex()

void ccPointCloud::addNormIndex ( CompressedNormType  index)

Pushes a compressed normal vector.

Parameters
indexcompressed normal vector

Definition at line 1809 of file ecvPointCloud.cpp.

References ccArray< Type, N, ComponentType >::addElement(), hasNormals(), m_normals, and reserveTheNormsTable().

Referenced by addNorm(), addNorms(), append(), From(), and ccGenericPrimitive::operator+=().

◆ addNorms() [1/2]

void ccPointCloud::addNorms ( const std::vector< CCVector3 > &  Ns)

Definition at line 1783 of file ecvPointCloud.cpp.

References addNorm().

Referenced by BallPivoting::BallPivoting().

◆ addNorms() [2/2]

void ccPointCloud::addNorms ( const std::vector< CompressedNormType > &  idxes)

Definition at line 1789 of file ecvPointCloud.cpp.

References addNormIndex().

◆ addRGBColor() [1/2]

void ccPointCloud::addRGBColor ( ColorCompType  r,
ColorCompType  g,
ColorCompType  b 
)
inline

Pushes an RGB color on stack (shortcut)

Parameters
rred component
ggreen component
bblue component

Definition at line 714 of file ecvPointCloud.h.

◆ addRGBColor() [2/2]

◆ addRGBColors()

void ccPointCloud::addRGBColors ( const std::vector< ecvColor::Rgb > &  colors)

Definition at line 1748 of file ecvPointCloud.cpp.

References addRGBColor(), and colors.

Referenced by BallPivoting::BallPivoting().

◆ addScalarField() [1/2]

int ccPointCloud::addScalarField ( ccScalarField sf)

Adds an existing scalar field to this cloud.

Warning: the cloud takes ownership of it!

Parameters
sfexisting scalar field
Returns
index of added scalar field (or -1 if an error occurred)

Definition at line 4225 of file ecvPointCloud.cpp.

References cloudViewer::ScalarField::getName(), cloudViewer::PointCloudTpl< ccGenericPointCloud >::getScalarFieldIndexByName(), CCShareable::link(), cloudViewer::PointCloudTpl< ccGenericPointCloud >::m_points, cloudViewer::PointCloudTpl< ccGenericPointCloud >::m_scalarFields, cloudViewer::ScalarField::reserveSafe(), cloudViewer::ScalarField::resizeSafe(), and CVLog::Warning().

◆ addScalarField() [2/2]

int ccPointCloud::addScalarField ( const char *  uniqueName)
overridevirtual

Creates a new scalar field and registers it.

Warnings:

  • the name must be unique (the method will fail if a SF with the same name already exists)
  • this method DOES resize the scalar field to match the current cloud size
    Parameters
    uniqueNamescalar field name (must be unique)
    Returns
    index of this new scalar field (or -1 if an error occurred)

Reimplemented from cloudViewer::PointCloudTpl< ccGenericPointCloud >.

Definition at line 4210 of file ecvPointCloud.cpp.

References CCShareable::release().

Referenced by LasCloudChunk::addLasFieldsToCloud(), append(), ccScalarFieldArithmeticsDlg::Apply(), ccLibAlgorithms::ApplyCCLibAlgorithm(), ccTrace::buildCurvatureCost(), ccTrace::buildGradientCost(), masc::Classifier::classify(), qCanupoProcess::Classify(), qM3C2Process::Compute(), qVoxFallProcess::Compute(), ccComparisonDlg::computeApproxDistances(), computeCPSet(), ccComparisonDlg::computeDistances(), ccLibAlgorithms::ComputeGeomCharacteristic(), DistanceMapGenerationTool::ComputeRadialDist(), ccKdTree::convertCellIndexToSF(), ccRasterizeTool::convertGridToCloud(), DistanceMapGenerationTool::ConvertMapToCloud(), ccEntityAction::convertNormalsTo(), ccRasterGrid::convertToCloud(), vtk2cc::ConvertToPointCloud(), pcl2cc::CopyScalarField(), copyScalarFields(), ccCropTool::Crop(), qPCV::doAction(), qPoissonRecon::doAction(), ccCompass::estimateP21(), masc::Classifier::evaluate(), exportCoordToSF(), exportNormalToSF(), GrainsAsEllipsoids::exportResultsAsCloud(), qFacets::extractFacets(), TreeIso::Final_seg_pcd(), From(), ccRasterizeTool::generateHillshade(), getMortarMaps(), ccRegistrationTools::ICP(), ccEntityAction::importToSF(), TreeIso::Init_seg_pcd(), TreeIso::Intermediate_seg_pcd(), ccPointCloudInterpolator::InterpolateScalarFieldsFrom(), LoadCloud(), PTXFilter::loadFile(), VTKFilter::loadFile(), LASFWFFilter::loadFile(), RDBFilter::loadFile(), PlyFilter::loadFile(), LoadScan(), ccTrace::optimizePath(), ccFastMarchingForNormsDirection::OrientNormals(), ccGenericPointCloud::pointPicking(), prepareCloud(), masc::Feature::PrepareSF(), CommandExtractCCs::process(), CommandStatTest::process(), PCVCommand::Process(), ResolveNormalsWithMST(), ccEntityAction::rgbGaussianFilter(), ccEntityAction::sfAddIdField(), ccEntityAction::sfGaussianFilter(), and ccEntityAction::statisticalTest().

◆ append()

const ccPointCloud & ccPointCloud::append ( ccPointCloud cloud,
unsigned  pointCountBefore,
bool  ignoreChildren = false 
)

Appends a cloud to this one.

Same as the += operator with pointCountBefore == size()

Parameters
cloudcloud to be added
pointCountBeforethe number of points previously contained in this cloud
ignoreChildrenwhether to copy input cloud's children or not
Returns
the resulting point cloud

Definition at line 631 of file ecvPointCloud.cpp.

References ccHObject::addChild(), cloudViewer::ScalarField::addElement(), addGrid(), addNormIndex(), cc2DLabel::addPickedPoint(), cloudViewer::PointCloudTpl< ccGenericPointCloud >::addPoint(), addRGBColor(), addScalarField(), ccWaveform::byteCount(), clearFWFData(), ccMesh::cloneMesh(), cc2DLabel::PickedPoint::cloud, ccDrawableObject::colorsShown(), ccScalarField::computeMinAndMax(), covariances_, cloudViewer::ScalarField::currentSize(), ccArray< Type, N, ComponentType >::currentSize(), ccWaveform::dataOffset(), ccGenericPointCloud::deleteOctree(), ccWaveform::descriptorID(), cc2DLabel::displayPointLegend(), CVLog::Error(), fwfData(), CV_TYPES::GBL_SENSOR, ccMesh::getAssociatedCloud(), ccHObject::getChild(), ccHObject::getChildrenNumber(), getCurrentDisplayedScalarField(), ccShiftedObject::getGlobalScale(), ccScalarField::getGlobalShift(), ccShiftedObject::getGlobalShift(), cloudViewer::ScalarField::getName(), ccObject::getName(), cc2DLabel::getName(), cloudViewer::PointCloudTpl< ccGenericPointCloud >::getNumberOfScalarFields(), cloudViewer::PointCloudTpl< T >::getNumberOfScalarFields(), cc2DLabel::getPickedPoint(), cloudViewer::PointCloudTpl< T >::getPoint(), cc2DLabel::getPosition(), cloudViewer::PointCloudTpl< ccGenericPointCloud >::getScalarField(), cloudViewer::PointCloudTpl< T >::getScalarField(), cloudViewer::PointCloudTpl< ccGenericPointCloud >::getScalarFieldIndexByName(), ccArray< Type, N, ComponentType >::getValue(), cloudViewer::ScalarField::getValue(), grid(), gridCount(), hasColors(), HasCovariances(), hasFWF(), hasNormals(), cloudViewer::GenericCloud::hasPoints(), CV_TYPES::IMAGE, ccScalarField::importParametersFrom(), cc2DLabel::PickedPoint::index, ccObject::isA(), cc2DLabel::isCollapsed(), cc2DLabel::isDisplayedIn2D(), ccObject::isKindOf(), cc2DLabel::isPointLegendDisplayed(), ccShiftedObject::isShifted(), ccDrawableObject::isVisible(), CV_TYPES::LABEL_2D, m_fwfDescriptors, m_fwfWaveforms, m_grids, m_normals, m_rgbColors, CV_TYPES::MESH, cloudViewer::ScalarField::NaN(), NAN_VALUE, ccDrawableObject::normalsShown(), notifyGeometryUpdate(), CCShareable::release(), reserve(), reserveTheFWFTable(), reserveTheNormsTable(), reserveTheRGBTable(), cloudViewer::ScalarField::resizeSafe(), cc2DLabel::setCollapsed(), setCurrentDisplayedScalarField(), ccWaveform::setDataDescription(), ccWaveform::setDescriptorID(), cc2DLabel::setDisplayedIn2D(), ccShiftedObject::setGlobalScale(), ccScalarField::setGlobalShift(), ccShiftedObject::setGlobalShift(), cc2DLabel::setPosition(), cloudViewer::ScalarField::setValue(), ccDrawableObject::setVisible(), ccDrawableObject::sfShown(), ccMesh::shiftTriangleIndexes(), ccDrawableObject::showColors(), ccDrawableObject::showNormals(), ccDrawableObject::showSF(), cc2DLabel::size(), cloudViewer::PointCloudTpl< T >::size(), cloudViewer::PointCloudTpl< ccGenericPointCloud >::size(), ccHObject::transferChild(), ccGenericPointCloud::unallocateVisibilityArray(), CVLog::Warning(), waveforms(), and ecvColor::white().

Referenced by cloudViewer::io::AutoReadEntity(), operator+=(), and operator=().

◆ applyFilterToRGB()

bool ccPointCloud::applyFilterToRGB ( PointCoordinateType  sigma,
PointCoordinateType  sigmaSF,
RgbFilterOptions  filterParams,
cloudViewer::GenericProgressCallback progressCb = nullptr 
)

Applies a spatial Gaussian filter on RGB colors.

The "amplitude" of the Gaussian filter must be specified (sigma). As 99% of the Gaussian distribution is between -3*sigma and +3*sigma around the mean value, this filter will only look for neighbors within a sphere of radius 3*sigma. One can also use the filter as a Bilateral filter. In this case the weights are computed considering the difference of the neighbors SF values with the current point SF value (also following a Gaussian distribution). Warning: this method assumes the output scalar field is set.

Parameters
sigmafilter variance
sigmaSFif strictly positive, the variance for the Bilateral filter
filterParamsfilter options
progressCbthe client application can get some notification of the process progress through this callback mechanism (see GenericProgressCallback)
Returns
success

Definition at line 2417 of file ecvPointCloud.cpp.

References ComputeCellGaussianFilter(), ccGenericPointCloud::computeOctree(), cloudViewer::DgmOctree::executeFunctionForAllCellsAtLevel(), cloudViewer::DgmOctree::findBestLevelForAGivenNeighbourhoodSizeExtraction(), cloudViewer::PointCloudTpl< ccGenericPointCloud >::getCurrentOutScalarField(), ccGenericPointCloud::getOctree(), hasColors(), cloudViewer::GenericProgressCallback::setInfo(), cloudViewer::GenericProgressCallback::setMethodTitle(), cloudViewer::PointCloudTpl< ccGenericPointCloud >::size(), cloudViewer::GenericProgressCallback::textCanBeEdited(), cloudViewer::GenericProgressCallback::update(), and CVLog::Warning().

Referenced by ccEntityAction::rgbGaussianFilter().

◆ applyGLTransformation()

void ccPointCloud::applyGLTransformation ( const ccGLMatrix trans)
overrideprotectedvirtual

Applies a GL transformation to the entity.

this = rotMat*(this-rotCenter)+(rotCenter+trans)

Parameters
transa ccGLMatrix structure

Reimplemented from ccHObject.

Definition at line 2489 of file ecvPointCloud.cpp.

References applyRigidTransformation().

◆ applyRigidTransformation()

◆ clear()

◆ clearFWFData()

void ccPointCloud::clearFWFData ( )

Clears all associated FWF data.

Definition at line 5626 of file ecvPointCloud.cpp.

References m_fwfDescriptors, and m_fwfWaveforms.

Referenced by append().

◆ clearLOD()

void ccPointCloud::clearLOD ( )

Clears the LOD structure.

Definition at line 5620 of file ecvPointCloud.cpp.

References ccPointCloudLOD::clear(), and m_lod.

Referenced by removeVisiblePoints().

◆ clone()

ccGenericPointCloud * ccPointCloud::clone ( ccGenericPointCloud destCloud = nullptr,
bool  ignoreChildren = false 
)
overridevirtual

Clones this entity.

All the main features of the entity are cloned, except from the octree and the points visibility information.

Parameters
destClouddestination cloud can be provided here (must be of the exact same type as the cloned cloud!)
ignoreChildren[optional] whether to ignore the cloud's children or not (in which case they will be cloned as well)
Returns
a copy of this entity

Implements ccGenericPointCloud.

Definition at line 552 of file ecvPointCloud.cpp.

References cloneThis(), CVLog::Error(), ccObject::isA(), and CV_TYPES::POINT_CLOUD.

Referenced by ccFacet::clone(), and unroll().

◆ cloneThis()

ccPointCloud * ccPointCloud::cloneThis ( ccPointCloud destCloud = nullptr,
bool  ignoreChildren = false 
)

Clones this entity.

All the main features of the entity are cloned, except from the octree and the points visibility information.

Parameters
destCloud[optional] the destination cloud can be provided here
ignoreChildren[optional] whether to ignore the cloud's children or not (in which case they will be cloned as well)
Returns
a copy of this entity

Definition at line 564 of file ecvPointCloud.cpp.

References ccPointCloud(), ccDrawableObject::colorsShown(), getCurrentDisplayedScalarFieldIndex(), ccObject::getName(), ccObject::isEnabled(), ccDrawableObject::isVisible(), ccDrawableObject::normalsShown(), result, and ccDrawableObject::sfShown().

Referenced by clone(), and ComputeKmeansClustering().

◆ ClusterDBSCAN()

std::vector< int > ccPointCloud::ClusterDBSCAN ( double  eps,
size_t  min_points,
bool  print_progress = false 
) const

Cluster ccPointCloud using the DBSCAN algorithm Ester et al., "A Density-Based Algorithm for Discovering Clusters in Large Spatial Databases with Noise", 1996.

Returns a list of point labels, -1 indicates noise according to the algorithm.

Parameters
epsDensity parameter that is used to find neighbouring points.
min_pointsMinimum number of points to form a cluster.
print_progressIf true the progress is visualized in the console.

Definition at line 50 of file PointCloudCluster.cpp.

Referenced by ccEntityAction::DBScanCluster().

◆ colorize()

bool ccPointCloud::colorize ( float  r,
float  g,
float  b 
)

Multiplies all color components of all points by coefficients.

If the cloud has no color, all points are considered white and the color array is automatically allocated.

Parameters
rred component
ggreen component
bblue component
Returns
success

Definition at line 1926 of file ecvPointCloud.cpp.

References ecvColor::RgbTpl< Type >::b, colorsHaveChanged(), ccArray< Type, N, ComponentType >::currentSize(), ccArray< Type, N, ComponentType >::fill(), ecvColor::RgbTpl< Type >::g, hasColors(), m_rgbColors, ecvColor::MAX, ecvColor::RgbTpl< Type >::r, and resizeTheRGBTable().

Referenced by define_ccPointCloud(), and ccEntityAction::setColor().

◆ colorsHaveChanged()

◆ compressFWFData()

bool ccPointCloud::compressFWFData ( )

Compresses the associated FWF data container.

As the container is shared, the compressed version will be potentially added to the memory resulting in a decrease of the available memory...

Definition at line 1310 of file ecvPointCloud.cpp.

References ccObject::getName(), m_fwfData, m_fwfWaveforms, offset, CVLog::Print(), and CVLog::Warning().

Referenced by LASFWFFilter::saveToFile().

◆ ComputeConvexHull()

std::tuple< std::shared_ptr< ccMesh >, std::vector< size_t > > ccPointCloud::ComputeConvexHull ( ) const

Function that computes the convex hull of the point cloud using qhull.

Definition at line 1425 of file PointCloudFactory.cpp.

References cloudViewer::geometry::Qhull::ComputeConvexHull().

Referenced by ccEntityAction::ConvexHull().

◆ computeCPSet()

◆ computeFWFAmplitude()

bool ccPointCloud::computeFWFAmplitude ( double &  minVal,
double &  maxVal,
ecvProgressDialog pDlg = nullptr 
) const

◆ computeGravityCenter()

CCVector3 ccPointCloud::computeGravityCenter ( )

Returns the cloud gravity center.

Returns
gravity center

Definition at line 2485 of file ecvPointCloud.cpp.

References cloudViewer::GeometricalAnalysisTools::ComputeGravityCenter().

Referenced by ccPointPairRegistrationDlg::callHornRegistration(), and Translate().

◆ ComputeMahalanobisDistance()

std::vector< double > ccPointCloud::ComputeMahalanobisDistance ( ) const

Function to compute the Mahalanobis distance for points in an input point cloud.

See: https://en.wikipedia.org/wiki/Mahalanobis_distance

Definition at line 1374 of file PointCloudFactory.cpp.

References Vector3Tpl< double >::fromArray(), and size.

Referenced by convert().

◆ ComputeNearestNeighborDistance()

std::vector< double > ccPointCloud::ComputeNearestNeighborDistance ( ) const

Function to compute the distance from a point to its nearest neighbor in the input point cloud

Definition at line 1394 of file PointCloudFactory.cpp.

References Vector3Tpl< double >::fromArray(), LogDebug, cloudViewer::geometry::KDTreeFlann::SearchKNN(), and size.

◆ computeNormalsWithGrids()

◆ computeNormalsWithOctree()

◆ ComputePointCloudDistance()

std::vector< double > ccPointCloud::ComputePointCloudDistance ( const ccPointCloud target)

Function to compute the point to point distances between point clouds.

For each point in the source point cloud, compute the distance to the target point cloud.

Parameters
targetThe target point cloud.

Definition at line 299 of file PointCloudFactory.cpp.

References Vector3Tpl< double >::fromArray(), LogDebug, cloudViewer::geometry::KDTreeFlann::SearchKNN(), cloudViewer::geometry::KDTreeFlann::SetGeometry(), and size.

◆ ComputeResolution()

double ccPointCloud::ComputeResolution ( ) const

◆ convertCurrentScalarFieldToColors()

bool ccPointCloud::convertCurrentScalarFieldToColors ( bool  mixWithExistingColor = false)

◆ convertNormalToDipDirSFs()

bool ccPointCloud::convertNormalToDipDirSFs ( ccScalarField dipSF,
ccScalarField dipDirSF 
)

Converts normals to two scalar fields: 'dip' and 'dip direction'.

One input scalar field may be empty if the corresponding value is not required

Parameters
[out]dipSFdip values
[out]dipDirSFdip direction values
Returns
success

Definition at line 1885 of file ecvPointCloud.cpp.

References ccScalarField::computeMinAndMax(), ccNormalVectors::ConvertNormalToDipAndDipDir(), count, getPointNormal(), cloudViewer::ScalarField::resizeSafe(), cloudViewer::ScalarField::setValue(), cloudViewer::PointCloudTpl< ccGenericPointCloud >::size(), and CVLog::Warning().

Referenced by ccEntityAction::convertNormalsTo().

◆ convertNormalToRGB()

◆ convertRGBToGreyScale()

bool ccPointCloud::convertRGBToGreyScale ( )

Converts RGB to grey scale colors.

Returns
success

Definition at line 1863 of file ecvPointCloud.cpp.

References colorsHaveChanged(), count, hasColors(), m_rgbColors, rgb, and cloudViewer::PointCloudTpl< ccGenericPointCloud >::size().

Referenced by ccEntityAction::rgbToGreyScale().

◆ CreateFromDepthImage()

std::shared_ptr< ccPointCloud > ccPointCloud::CreateFromDepthImage ( const cloudViewer::geometry::Image depth,
const cloudViewer::camera::PinholeCameraIntrinsic intrinsic,
const Eigen::Matrix4d &  extrinsic = Eigen::Matrix4d::Identity(),
double  depth_scale = 1000.0,
double  depth_trunc = 1000.0,
int  stride = 1,
bool  project_valid_depth_only = true 
)
static

Factory function to create a pointcloud from a depth image and a camera model.

Given depth value d at (u, v) image coordinate, the corresponding 3d point is: z = d / depth_scale
x = (u - cx) * z / fx
y = (v - cy) * z / fy

Parameters
depthThe input depth image can be either a float image, or a uint16_t image.
intrinsicIntrinsic parameters of the camera.
extrinsicExtrinsic parameters of the camera.
depth_scaleThe depth is scaled by 1 / depth_scale.
depth_truncTruncated at depth_trunc distance.
strideSampling factor to support coarse point cloud extraction.

\Return An empty pointcloud if the conversion fails. If

Parameters
project_valid_depth_onlyis true, return point cloud, which doesn't have nan point. If the value is false, return point cloud, which has a point for each pixel, whereas invalid depth results in NaN points.

Definition at line 216 of file PointCloudFactory.cpp.

References cloudViewer::geometry::Image::bytes_per_channel_, cloudViewer::geometry::Image::ConvertDepthToFloatImage(), LogError, cloudViewer::geometry::Image::num_of_channels_, and stride.

Referenced by cloudViewer::pipelines::integration::ScalableTSDFVolume::Integrate(), and main().

◆ CreateFromRGBDImage()

std::shared_ptr< ccPointCloud > ccPointCloud::CreateFromRGBDImage ( const cloudViewer::geometry::RGBDImage image,
const cloudViewer::camera::PinholeCameraIntrinsic intrinsic,
const Eigen::Matrix4d &  extrinsic = Eigen::Matrix4d::Identity(),
bool  project_valid_depth_only = true 
)
static

Factory function to create a pointcloud from an RGB-D image and a camera model.

Given depth value d at (u, v) image coordinate, the corresponding 3d point is: z = d / depth_scale
x = (u - cx) * z / fx
y = (v - cy) * z / fy

Parameters
imageThe input image.
intrinsicIntrinsic parameters of the camera.
extrinsicExtrinsic parameters of the camera.

\Return An empty pointcloud if the conversion fails. If

Parameters
project_valid_depth_onlyis true, return point cloud, which doesn't have nan point. If the value is false, return point cloud, which has a point for each pixel, whereas invalid depth results in NaN points.

Definition at line 242 of file PointCloudFactory.cpp.

References image, and LogError.

◆ CreateFromVoxelGrid()

std::shared_ptr< ccPointCloud > ccPointCloud::CreateFromVoxelGrid ( const cloudViewer::geometry::VoxelGrid voxel_grid)

Function to create a PointCloud from a VoxelGrid.

It transforms the voxel centers to 3D points using the original point cloud coordinate (with respect to the center of the voxel grid).

Parameters
voxel_gridThe input VoxelGrid.

Definition at line 268 of file PointCloudFactory.cpp.

References cloudViewer::geometry::Voxel::color_, ecvColor::RgbTpl< Type >::FromEigen(), cloudViewer::geometry::VoxelGrid::GetVoxelCenterCoordinate(), cloudViewer::geometry::Voxel::grid_index_, has_colors, cloudViewer::geometry::VoxelGrid::HasColors(), and cloudViewer::geometry::VoxelGrid::voxels_.

◆ createNewCloudFromVisibilitySelection()

ccGenericPointCloud * ccPointCloud::createNewCloudFromVisibilitySelection ( bool  removeSelectedPoints = false,
VisibilityTableType visTable = nullptr,
std::vector< int > *  newIndexesOfRemainingPoints = nullptr,
bool  silent = false,
cloudViewer::ReferenceCloud selection = nullptr 
)
overridevirtual

◆ Crop() [1/2]

std::shared_ptr< ccPointCloud > ccPointCloud::Crop ( const ccBBox bbox) const

◆ crop() [1/2]

cloudViewer::ReferenceCloud * ccPointCloud::crop ( const ccBBox box,
bool  inside = true 
)
overridevirtual

Crops the cloud inside (or outside) a bounding box.

Warning
Always returns a selection (potentially empty) if successful.
Parameters
boxcropping box
insidewhether selected points are inside or outside the box
Returns
points falling inside (or outside) as a selection

Implements ccGenericPointCloud.

Definition at line 4900 of file ecvPointCloud.cpp.

References cloudViewer::ReferenceCloud::addPointIndex(), cloudViewer::ReferenceCloud::clear(), cloudViewer::BoundingBoxTpl< T >::contains(), count, cloudViewer::BoundingBoxTpl< T >::isValid(), cloudViewer::PointCloudTpl< ccGenericPointCloud >::point(), cloudViewer::ReferenceCloud::reserve(), cloudViewer::ReferenceCloud::resize(), cloudViewer::PointCloudTpl< ccGenericPointCloud >::size(), cloudViewer::ReferenceCloud::size(), and CVLog::Warning().

Referenced by ccCropTool::Crop().

◆ Crop() [2/2]

std::shared_ptr< ccPointCloud > ccPointCloud::Crop ( const ecvOrientedBBox bbox) const

Function to crop ccPointCloud into output ccPointCloud.

All points with coordinates outside the bounding box bbox are clipped.

Parameters
bboxOrientedBoundingBox to crop points.

Definition at line 235 of file PointCloudSegmentation.cpp.

References cloudViewer::OrientedBoundingBox::GetPointIndicesWithinBoundingBox(), ecvOrientedBBox::IsEmpty(), cloudViewer::t::geometry::SelectByIndex(), and CVLog::Warning().

◆ crop() [2/2]

◆ crop2D()

cloudViewer::ReferenceCloud * ccPointCloud::crop2D ( const ccPolyline poly,
unsigned char  orthoDim,
bool  inside = true 
)

Crops the cloud inside (or outside) a 2D polyline.

Warning
Always returns a selection (potentially empty) if successful.
Parameters
polycroping polyline
orthoDimdimension orthogonal to the plane in which the segmentation should occur (X=0, Y=1, Z=2)
insidewhether selected points are inside or outside the polyline
Returns
points falling inside (or outside) as a selection

Definition at line 4982 of file ecvPointCloud.cpp.

References cloudViewer::ReferenceCloud::addPointIndex(), cloudViewer::ReferenceCloud::clear(), count, cloudViewer::ManualSegmentationTools::isPointInsidePoly(), cloudViewer::PointCloudTpl< ccGenericPointCloud >::point(), cloudViewer::ReferenceCloud::reserve(), cloudViewer::ReferenceCloud::resize(), cloudViewer::PointCloudTpl< ccGenericPointCloud >::size(), cloudViewer::ReferenceCloud::size(), Tuple3Tpl< Type >::u, CVLog::Warning(), and X.

Referenced by define_ccPointCloud().

◆ deleteAllScalarFields()

void ccPointCloud::deleteAllScalarFields ( )
overridevirtual

◆ deleteScalarField()

void ccPointCloud::deleteScalarField ( int  index)
overridevirtual

Deletes a specific scalar field.

WARNING: this operation may modify the scalar fields order (especially if the deleted SF is not the last one). However current IN & OUT scalar fields will stay up-to-date (while their index may change).

Parameters
indexindex of scalar field to be deleted

Reimplemented from cloudViewer::PointCloudTpl< ccGenericPointCloud >.

Definition at line 3237 of file ecvPointCloud.cpp.

References cloudViewer::PointCloudTpl< ccGenericPointCloud >::deleteScalarField(), cloudViewer::PointCloudTpl< ccGenericPointCloud >::getNumberOfScalarFields(), m_currentDisplayedScalarFieldIndex, cloudViewer::PointCloudTpl< ccGenericPointCloud >::m_currentInScalarFieldIndex, setCurrentDisplayedScalarField(), cloudViewer::PointCloudTpl< ccGenericPointCloud >::setCurrentInScalarField(), and ccDrawableObject::showSF().

Referenced by ccScalarFieldArithmeticsDlg::Apply(), ccComparisonDlg::applyAndExit(), ccLibAlgorithms::ApplyCCLibAlgorithm(), ccTrace::buildCurvatureCost(), ccTrace::buildGradientCost(), ccComparisonDlg::cancelAndExit(), masc::Classifier::classify(), qCanupoProcess::Classify(), ccComparisonDlg::computeApproxDistances(), computeCPSet(), ccComparisonDlg::computeDistances(), ccLibAlgorithms::ComputeGeomCharacteristic(), ccEntityAction::convertNormalsTo(), pcl2cc::CopyScalarField(), ccMeasurementDevice::deleteScalarFieldFromCloud(), qPCV::doAction(), masc::Classifier::evaluate(), qFacets::extractFacets(), ccRegistrationTools::ICP(), PlyFilter::loadFile(), ccFastMarchingForNormsDirection::OrientNormals(), CommandExtractCCs::process(), PCVCommand::Process(), SFCollector::releaseSFs(), RemoveScalarField(), and CommandRemoveSF::removeSF().

◆ drawMeOnly()

◆ enableVisibilityCheck()

void ccPointCloud::enableVisibilityCheck ( bool  state)
inline

Sets whether visibility check is enabled or not (e.g. during distances computation) See ccPointCloud::testVisibility.

Definition at line 618 of file ecvPointCloud.h.

Referenced by ccComparisonDlg::computeDistances().

◆ enhanceRGBWithIntensitySF()

bool ccPointCloud::enhanceRGBWithIntensitySF ( int  sfIdx,
bool  useCustomIntensityRange = false,
double  minI = 0.0,
double  maxI = 1.0 
)

◆ EstimateCovariances()

void ccPointCloud::EstimateCovariances ( const cloudViewer::geometry::KDTreeSearchParam search_param = cloudViewer::geometry::KDTreeSearchParamKNN())

Function to compute the covariance matrix for each point of a point cloud.

Parameters
search_paramThe KDTree search parameters for neighborhood search.

Definition at line 1160 of file PointCloudFactory.cpp.

◆ EstimateNormals()

bool ccPointCloud::EstimateNormals ( const cloudViewer::geometry::KDTreeSearchParam search_param = cloudViewer::geometry::KDTreeSearchParamKNN(),
bool  fast_normal_computation = true 
)

Function to compute the normals of a point cloud.

Normals are oriented with respect to the input point cloud if normals exist.

Parameters
search_paramThe KDTree search parameters for neighborhood search.
fast_normal_computationIf true, the normal estiamtion uses a non-iterative method to extract the eigenvector from the covariance matrix. This is faster, but is not as numerical stable.

Definition at line 1166 of file PointCloudFactory.cpp.

References Vector3Tpl< double >::fromArray(), and normal.

Referenced by convert().

◆ EstimatePerPointCovariances()

std::vector< Eigen::Matrix3d > ccPointCloud::EstimatePerPointCovariances ( const ccPointCloud input,
const cloudViewer::geometry::KDTreeSearchParam search_param = cloudViewer::geometry::KDTreeSearchParamKNN() 
)
static

Static function to compute the covariance matrix for each point of a point cloud. Doesn't change the input PointCloud, just outputs the covariance matrices.

Parameters
inputPointCloud to use for covariance computation
search_paramThe KDTree search parameters for neighborhood search.

Definition at line 1130 of file PointCloudFactory.cpp.

References cloudViewer::utility::ComputeCovariance(), covariances_, e, cloudViewer::PointCloudTpl< T >::getEigenPoints(), HasCovariances(), points, cloudViewer::geometry::KDTreeFlann::Search(), and cloudViewer::geometry::KDTreeFlann::SetGeometry().

◆ exportCoordToSF()

◆ exportNormalToSF()

◆ FarthestPointDownSample()

std::shared_ptr< ccPointCloud > ccPointCloud::FarthestPointDownSample ( const size_t  num_samples,
const size_t  start_index = 0 
) const

Function to downsample input pointcloud into output pointcloud with a set of points has farthest distance.

The sample is performed by selecting the farthest point from previous selected points iteratively, starting from start_index.

Parameters
num_samplesNumber of points to be sampled.
start_indexIndex to start downsampling from.

Definition at line 794 of file PointCloudFactory.cpp.

References LogError, cloudViewer::t::geometry::SelectByIndex(), and size.

◆ filterPointsByScalarValue() [1/2]

ccPointCloud * ccPointCloud::filterPointsByScalarValue ( ScalarType  minVal,
ScalarType  maxVal,
bool  outside = false 
)

Filters out points whose scalar values falls into an interval.

Threshold values should be expressed relatively to the current displayed scalar field.

Parameters
minValminimum value
maxValmaximum value
outsidewhether to select the points inside or outside of the specified interval
Returns
resulting cloud (remaining points)

Definition at line 2953 of file ecvPointCloud.cpp.

References cloudViewer::PointCloudTpl< ccGenericPointCloud >::getCurrentOutScalarField(), partialClone(), and cloudViewer::ManualSegmentationTools::segment().

Referenced by ecvFilterByLabelDlg::apply().

◆ filterPointsByScalarValue() [2/2]

ccPointCloud * ccPointCloud::filterPointsByScalarValue ( std::vector< ScalarType >  values,
bool  outside = false 
)

Filters out points whose scalar values falls into an interval.

Threshold values should be expressed relatively to the current displayed scalar field.

Parameters
valuesfilter scalar values
outsidewhether to select the points inside or outside of the specified interval
Returns
resulting cloud (remaining points)

Definition at line 2967 of file ecvPointCloud.cpp.

References cloudViewer::PointCloudTpl< ccGenericPointCloud >::getCurrentOutScalarField(), partialClone(), and cloudViewer::ManualSegmentationTools::segment().

◆ From() [1/3]

ccPointCloud * ccPointCloud::From ( cloudViewer::GenericCloud cloud,
const ccGenericPointCloud sourceCloud = nullptr 
)
static

Creates a new point cloud object from a GenericCloud.

"GenericCloud" is a very simple and light interface from cloudViewer. It is meant to give access to points coordinates of any cloud (on the condition it implements the GenericCloud interface of course). See cloudViewer documentation for more information about GenericClouds. As the GenericCloud interface is very simple, only points are imported. Note: throws an 'int' exception in case of error (see CTOR_ERRORS)

Parameters
clouda GenericCloud structure
sourceCloudcloud from which main parameters will be imported (optional)

Definition at line 83 of file ecvPointCloud.cpp.

References cloudViewer::PointCloudTpl< T >::addPoint(), ccPointCloud(), CVLog::Error(), cloudViewer::GenericCloud::getNextPoint(), ccGenericPointCloud::importParametersFrom(), cloudViewer::GenericCloud::placeIteratorAtBeginning(), reserveThePointsTable(), cloudViewer::GenericCloud::size(), sourceCloud, and CVLog::Warning().

◆ From() [2/3]

ccPointCloud * ccPointCloud::From ( const ccPointCloud sourceCloud,
const std::vector< size_t > &  indices,
bool  invert = false 
)
static

◆ From() [3/3]

ccPointCloud * ccPointCloud::From ( const cloudViewer::GenericIndexedCloud cloud,
const ccGenericPointCloud sourceCloud = nullptr 
)
static

Creates a new point cloud object from a GenericIndexedCloud.

"GenericIndexedCloud" is an extension of GenericCloud (from cloudViewer) which provides a const random accessor to points. See cloudViewer documentation for more information about GenericIndexedCloud. As the GenericIndexedCloud interface is very simple, only points are imported. Note: throws an 'int' exception in case of error (see CTOR_ERRORS)

Parameters
clouda GenericIndexedCloud structure
sourceCloudcloud from which main parameters will be imported (optional)

Definition at line 114 of file ecvPointCloud.cpp.

References cloudViewer::PointCloudTpl< T >::addPoint(), ccPointCloud(), CVLog::Error(), cloudViewer::GenericIndexedCloud::getPoint(), ccGenericPointCloud::importParametersFrom(), reserveThePointsTable(), cloudViewer::GenericCloud::size(), sourceCloud, and CVLog::Warning().

Referenced by ccRasterGrid::convertToCloud(), ccCropTool::Crop(), ecvTools::GetClousterGroup(), ccPolyline::initWith(), ccMesh::mergeDuplicatedVertices(), ccEntityAction::RansacSegmentation(), ccGenericMesh::samplePoints(), ccPolyline::split(), and ccMesh::subdivide().

◆ fromFile_MeOnly()

bool ccPointCloud::fromFile_MeOnly ( QFile &  in,
short  dataVersion,
int  flags,
LoadedIDMap oldToNewIDMap 
)
overrideprotectedvirtual

Loads own object data.

Called by 'fromFile' (recursive scheme) To be overloaded (but still called ;) by subclass.

Parameters
ininput file
dataVersionfile version
flagsdeserialization flags (see ccSerializableObject::DeserializationFlags)
oldToNewIDMapmap to link old IDs with new IDs

Reimplemented from ccGenericPointCloud.

Definition at line 4640 of file ecvPointCloud.cpp.

◆ fwfData() [1/2]

SharedFWFDataContainer& ccPointCloud::fwfData ( )
inline

◆ fwfData() [2/2]

const SharedFWFDataContainer& ccPointCloud::fwfData ( ) const
inline

Gives access to the associated FWF data container (const version)

Definition at line 527 of file ecvPointCloud.h.

◆ fwfDescriptors() [1/2]

FWFDescriptorSet& ccPointCloud::fwfDescriptors ( )
inline

◆ fwfDescriptors() [2/2]

const FWFDescriptorSet& ccPointCloud::fwfDescriptors ( ) const
inline

Gives access to the FWF descriptors (const version)

Definition at line 512 of file ecvPointCloud.h.

◆ GetAxisAlignedBoundingBox()

ccBBox ccPointCloud::GetAxisAlignedBoundingBox ( ) const
overridevirtual

Returns an axis-aligned bounding box of the geometry.

Reimplemented from ccHObject.

Definition at line 4974 of file ecvPointCloud.cpp.

References ccBBox::CreateFromPoints(), and cloudViewer::PointCloudTpl< ccGenericPointCloud >::m_points.

Referenced by cloudViewer::visualization::rendering::PointCloudBuffersBuilder::ComputeAABB().

◆ GetCenter()

virtual Eigen::Vector3d ccPointCloud::GetCenter ( ) const
inlineoverridevirtual

Returns the center of the geometry coordinates.

Reimplemented from ccHObject.

Definition at line 970 of file ecvPointCloud.h.

References Vector3Tpl< PointCoordinateType >::fromArrayContainer().

◆ getClassID()

CV_CLASS_ENUM ccPointCloud::getClassID ( ) const
inlineoverridevirtual

Returns class ID.

Reimplemented from ccHObject.

Definition at line 167 of file ecvPointCloud.h.

References CV_TYPES::POINT_CLOUD.

◆ getCurrentDisplayedScalarField()

ccScalarField * ccPointCloud::getCurrentDisplayedScalarField ( ) const

Returns the currently displayed scalar (or 0 if none)

Definition at line 3218 of file ecvPointCloud.cpp.

References cloudViewer::PointCloudTpl< ccGenericPointCloud >::getScalarField(), and m_currentDisplayedScalarFieldIndex.

Referenced by ccRasterizeTool::activeLayerChanged(), ccRasterizeTool::addNewContour(), append(), ccColorFromScalarDlg::ccColorFromScalarDlg(), qCanupoProcess::Classify(), MLSSmoothingUpsampling::compute(), ccEntityAction::computeStatParams(), define_ccPointCloud(), qSRA::doProjectCloudDistsInGrid(), qCanupoPlugin::doTrainAction(), ccGenericMesh::drawMeOnly(), ccMesh::drawMeOnly(), ccDBRoot::editLabelScalarValue(), DistanceMapGenerationDlg::exportMapAsCloud(), ccPropertiesTreeDelegate::fillSFWithPointCloud(), ccRasterizeTool::generateContours(), ccRasterizeTool::generateImage(), cc2DLabel::getLabelInfo1(), cc2smReader::getPclCloud2(), ccTrace::getSegmentCostScalar(), ccTrace::getSegmentCostScalarInv(), cc2smReader::getVtkPolyDataFromMeshCloud(), ccRegistrationTools::ICP(), E57Filter::loadFile(), ccFastMarchingForNormsDirection::OrientNormals(), partialClone(), ccGenericPointCloud::pointPicking(), ccOctree::pointPicking(), qCanupoClassifDialog::qCanupoClassifDialog(), RefinePointClassif(), ccEntityAction::rgbGaussianFilter(), ccColorScaleEditorDialog::saveCurrentScale(), SelectByIndex(), ccPropertiesTreeDelegate::setEditorData(), ecvFilterByLabelDlg::setInputEntity(), ccEntityAction::sfConvertToRandomRGB(), ccEntityAction::sfConvertToRGB(), ccEntityAction::sfGaussianFilter(), ccEntityAction::sfRename(), ccEntityAction::sfSetAsCoord(), ccComparisonDlg::showHisto(), ecvFilterByLabelDlg::start(), ccEntityAction::statisticalTest(), and ccColorFromScalarDlg::~ccColorFromScalarDlg().

◆ getCurrentDisplayedScalarFieldIndex()

◆ getDrawingParameters()

void ccPointCloud::getDrawingParameters ( glDrawParams params) const
overridevirtual

◆ getEigenColor()

◆ getEigenColors()

std::vector< Eigen::Vector3d > ccPointCloud::getEigenColors ( ) const

◆ getEigenNormal()

◆ getEigenNormals()

std::vector< Eigen::Vector3d > ccPointCloud::getEigenNormals ( ) const

◆ GetMaxBound()

virtual Eigen::Vector3d ccPointCloud::GetMaxBound ( ) const
inlineoverridevirtual

Returns max bounds for geometry coordinates.

Reimplemented from ccHObject.

Definition at line 967 of file ecvPointCloud.h.

References Vector3Tpl< PointCoordinateType >::fromArrayContainer().

Referenced by cloudViewer::geometry::Octree::ConvertFromPointCloud(), and cloudViewer::geometry::VoxelGrid::CreateFromPointCloud().

◆ GetMinBound()

virtual Eigen::Vector3d ccPointCloud::GetMinBound ( ) const
inlineoverridevirtual

Returns min bounds for geometry coordinates.

Reimplemented from ccHObject.

Definition at line 963 of file ecvPointCloud.h.

References Vector3Tpl< PointCoordinateType >::fromArrayContainer().

Referenced by cloudViewer::geometry::Octree::ConvertFromPointCloud(), and cloudViewer::geometry::VoxelGrid::CreateFromPointCloud().

◆ getNormal()

const CCVector3 * ccPointCloud::getNormal ( unsigned  index) const
overridevirtual

If per-point normals are available, returns the one at a specific index.

Warning
If overriden, this method should return a valid normal for all points

Reimplemented from cloudViewer::GenericIndexedCloud.

Definition at line 1561 of file ecvPointCloud.cpp.

References ccNormalVectors::GetNormal(), ccArray< Type, N, ComponentType >::getValue(), and m_normals.

Referenced by cc2smReader::getAsPointNormal().

◆ getNorms() [1/2]

std::vector< CompressedNormType > ccPointCloud::getNorms ( ) const

Definition at line 1795 of file ecvPointCloud.cpp.

◆ getNorms() [2/2]

void ccPointCloud::getNorms ( std::vector< CompressedNormType > &  idxes) const

Definition at line 1801 of file ecvPointCloud.cpp.

References getPointNormalIndex(), and m_normals.

◆ GetOrientedBoundingBox()

ecvOrientedBBox ccPointCloud::GetOrientedBoundingBox ( ) const
overridevirtual

◆ getPointColor()

◆ getPointColorPtr()

ecvColor::Rgb & ccPointCloud::getPointColorPtr ( size_t  pointIndex)

Definition at line 1542 of file ecvPointCloud.cpp.

References hasColors(), and m_rgbColors.

Referenced by cloudViewer::ModelViewerWidget::SelectObject().

◆ getPointColors()

const ColorsTableType& ccPointCloud::getPointColors ( ) const
inline

◆ getPointDisplayedDistance()

ScalarType ccPointCloud::getPointDisplayedDistance ( unsigned  pointIndex) const
overridevirtual

Returns scalar value associated to a given point.

The returned value is taken from the current displayed scalar field WARNING: scalar field must be enabled! (see ccDrawableObject::hasDisplayedScalarField)

Implements ccGenericPointCloud.

Definition at line 1528 of file ecvPointCloud.cpp.

References cloudViewer::ScalarField::getValue(), and m_currentDisplayedScalarField.

◆ getPointNormal()

◆ getPointNormalIndex()

const CompressedNormType & ccPointCloud::getPointNormalIndex ( unsigned  pointIndex) const
overridevirtual

Returns compressed normal corresponding to a given point.

WARNING: normals array must be enabled! (see ccDrawableObject::hasNormals)

Implements ccGenericPointCloud.

Definition at line 1549 of file ecvPointCloud.cpp.

References ccArray< Type, N, ComponentType >::getValue(), and m_normals.

Referenced by ccTrace::fitPlane(), getNorms(), and partialClone().

◆ getPointNormalPtr()

CCVector3 & ccPointCloud::getPointNormalPtr ( size_t  pointIndex) const

◆ getPointNormals()

◆ getPointNormalsPtr()

std::vector< CCVector3 * > ccPointCloud::getPointNormalsPtr ( ) const

◆ getPointScalarValueColor()

const ecvColor::Rgb * ccPointCloud::getPointScalarValueColor ( unsigned  pointIndex) const
overridevirtual

Returns color corresponding to a given point associated scalar value.

The returned value depends on the current scalar field display parameters. It may even be 0 if the value shouldn't be displayed. WARNING: scalar field must be enabled! (see ccDrawableObject::hasDisplayedScalarField)

Implements ccGenericPointCloud.

Definition at line 1513 of file ecvPointCloud.cpp.

References ccScalarField::getColorScale(), ccScalarField::getValueColor(), and m_currentDisplayedScalarField.

Referenced by convertCurrentScalarFieldToColors(), and setRGBColorWithCurrentScalarField().

◆ getScalarValueColor()

const ecvColor::Rgb * ccPointCloud::getScalarValueColor ( ScalarType  d) const
overridevirtual

Returns color corresponding to a given scalar value.

The returned value depends on the current scalar field display parameters. It may even be 0 if the value shouldn't be displayed. WARNING: scalar field must be enabled! (see ccDrawableObject::hasDisplayedScalarField)

Implements ccGenericPointCloud.

Definition at line 1521 of file ecvPointCloud.cpp.

References ccScalarField::getColor(), ccScalarField::getColorScale(), and m_currentDisplayedScalarField.

Referenced by cc2smReader::getFloatScalarField(), and cc2smReader::getvtkScalars().

◆ getUniqueIDForDisplay()

unsigned ccPointCloud::getUniqueIDForDisplay ( ) const
overridevirtual

Returns object unqiue ID used for display.

Reimplemented from ccHObject.

Definition at line 4893 of file ecvPointCloud.cpp.

References CV_TYPES::FACET, ccObject::getUniqueID(), ccObject::isA(), and ccHObject::m_parent.

◆ grid() [1/2]

◆ grid() [2/2]

const Grid::Shared& ccPointCloud::grid ( size_t  gridIndex) const
inline

Returns an associated grid (const verson)

Definition at line 445 of file ecvPointCloud.h.

◆ gridCount()

◆ hasColors()

bool ccPointCloud::hasColors ( ) const
overridevirtual

Returns whether colors are enabled or not.

Reimplemented from ccDrawableObject.

Definition at line 1689 of file ecvPointCloud.cpp.

References ccArray< Type, N, ComponentType >::isAllocated(), and m_rgbColors.

Referenced by ccRasterizeTool::activeLayerChanged(), MeshWrapper< Real >::addColor(), addEigenColors(), LasCloudChunk::addLasFieldsToCloud(), addRGBColor(), ecvPoissonReconDlg::adjustParams(), append(), applyFilterToRGB(), BallPivoting::BallPivoting(), ccCloudLayersHelper::ccCloudLayersHelper(), ccEntityAction::changeColorLevels(), cc2smReader::checkIfFieldExists(), masc::PointFeature::checkValidity(), colorize(), GeneralFilters::compute(), cloudViewer::pipelines::registration::TransformationEstimationForColoredICP::ComputeTransformation(), cloudViewer::visualization::rendering::PointCloudBuffersBuilder::ConstructBuffers(), convertCurrentScalarFieldToColors(), cloudViewer::geometry::Octree::ConvertFromPointCloud(), convertRGBToGreyScale(), ccRasterGrid::convertToCloud(), copyRGBColors(), ccMesh::CreateFromPointCloudAlphaShape(), cloudViewer::geometry::VoxelGrid::CreateFromPointCloudWithinBounds(), qPoissonRecon::doAction(), ccEntityAction::enhanceRGBWithIntensities(), enhanceRGBWithIntensitySF(), cloudViewer::pipelines::integration::ScalableTSDFVolume::ExtractTriangleMesh(), cloudViewer::pipelines::integration::UniformTSDFVolume::ExtractTriangleMesh(), ccMesh::FilterSharpen(), ccMesh::FilterSmoothLaplacian(), ccMesh::FilterSmoothSimple(), ccMesh::FilterSmoothTaubin(), From(), ccDBRoot::gatherRecursiveInformation(), cc2smReader::getAsSM(), PointCloudWrapper< Real >::getColor(), cc2smReader::getColors(), getDrawingParameters(), getPointColor(), getPointColorPtr(), ccTrace::getSegmentCost(), cc2smReader::getvtkScalars(), LasScalarFieldLoader::handleRGBValue(), LasSaveDialog::handleSelectedPointFormatChange(), LasCloudChunk::hasColors(), PointCloudWrapper< Real >::hasColors(), BasePclModule::hasSelectedRGB(), ColorScalarFieldWrapper::isValid(), LasSaver::LasSaver(), PTXFilter::loadFile(), VTKFilter::loadFile(), DRCFilter::loadFile(), LASFilter::loadFile(), PlyFilter::loadFile(), ccColorFromScalarDlg::onApply(), MinimumCutSegmentation::openInputDialog(), RegionGrowingSegmentation::openInputDialog(), ccGenericPrimitive::operator+=(), ccTrace::optimizeSegment(), partialClone(), ccMesh::pushSubdivide(), cloudViewer::pipelines::registration::RegistrationColoredICP(), removePoints(), ccMesh::RemoveVerticesByMask(), reserve(), resize(), ccMesh::resizeAssociatedCloud(), ccEntityAction::rgbGaussianFilter(), ccEntityAction::rgbToGreyScale(), LasSaver::saveNextPoint(), SaveScan(), PcdFilter::saveToFile(), LASFWFFilter::saveToFile(), DepthMapFileFilter::saveToFile(), LasDetails::SelectBestVersion(), ccMesh::SelectByIndex(), SelectByIndex(), cloudViewer::io::rpc::SetPointCloud(), setRGBColor(), setRGBColorByBanding(), setRGBColorByHeight(), setRGBColorWithCurrentScalarField(), ccEntityAction::sfFromColor(), ccMesh::SimplifyQuadricDecimation(), ccMesh::SimplifyVertexClustering(), ecvPoissonReconDlg::start(), ccMesh::SubdivideLoop(), ccMesh::SubdivideMidpoint(), swapPoints(), cloudViewer::io::WritePointCloudToPLY(), cloudViewer::io::WritePointCloudToPTS(), and cloudViewer::io::WritePointCloudToXYZRGB().

◆ HasCovariances()

bool ccPointCloud::HasCovariances ( ) const
inline

Returns 'true' if the point cloud contains per-point covariance matrix.

Definition at line 988 of file ecvPointCloud.h.

Referenced by append(), cloudViewer::pipelines::registration::TransformationEstimationForGeneralizedICP::ComputeTransformation(), EstimatePerPointCovariances(), resize(), and SelectByIndex().

◆ hasDisplayedScalarField()

bool ccPointCloud::hasDisplayedScalarField ( ) const
overridevirtual

◆ hasFWF()

◆ hasNormals()

bool ccPointCloud::hasNormals ( ) const
overridevirtual

Returns whether normals are enabled or not.

Reimplemented from ccDrawableObject.

Definition at line 1693 of file ecvPointCloud.cpp.

References ccArray< Type, N, ComponentType >::isAllocated(), and m_normals.

Referenced by addEigenNorms(), MeshWrapper< Real >::addNormal(), addNormAtIndex(), addNormIndex(), append(), applyRigidTransformation(), BallPivoting::BallPivoting(), ccQuadric::buildUp(), cloudViewer::pipelines::registration::CorrespondenceCheckerBasedOnNormal::Check(), cc2smReader::checkIfFieldExists(), masc::PointFeature::checkValidity(), NormalEstimation::compute(), ProjectionFilter::compute(), GreedyTriangulation::compute(), MarchingCubeReconstruction::compute(), PoissonReconstruction::compute(), FastGlobalRegistrationFilter::compute(), qM3C2Process::Compute(), cloudViewer::utility::ComputeFPFHFeature(), computeNormalsWithGrids(), computeNormalsWithOctree(), ccMesh::computePerVertexNormals(), cloudViewer::pipelines::registration::TransformationEstimationPointToPlane::ComputeRMSE(), cloudViewer::pipelines::registration::TransformationEstimationForColoredICP::ComputeTransformation(), cloudViewer::pipelines::registration::TransformationEstimationPointToPlane::ComputeTransformation(), cloudViewer::visualization::rendering::PointCloudBuffersBuilder::ConstructBuffers(), convert(), ccEntityAction::convertNormalsTo(), convertNormalToRGB(), vtk2cc::ConvertToMultiPolylines(), qFacets::createFacets(), ccMesh::CreateFromPointCloudAlphaShape(), ccMesh::CreateFromPointCloudPoisson(), qPoissonRecon::doAction(), exportNormalToSF(), ccEntityAction::exportNormalToSF(), qFacets::extractFacets(), ccMesh::FilterSharpen(), ccMesh::FilterSmoothLaplacian(), ccMesh::FilterSmoothSimple(), ccMesh::FilterSmoothTaubin(), ccTrace::fitPlane(), From(), ccDBRoot::gatherRecursiveInformation(), cc2smReader::getAsPointNormal(), cc2smReader::getAsSM(), getDrawingParameters(), PointCloudWrapper< Real >::getNormal(), cc2smReader::getNormals(), qM3C2Dialog::getNormalsComputationMode(), cc2smReader::getOneOf(), FastGlobalRegistrationFilter::getParametersFromDialog(), ccTrace::getPointNormal(), PointCloudWrapper< Real >::hasNormals(), StereogramWidget::init(), ccMesh::invertNormals(), invertNormals(), ccEntityAction::invertNormals(), NormDipAndDipDirFieldWrapper::isValid(), PTXFilter::loadFile(), VTKFilter::loadFile(), DRCFilter::loadFile(), PlyFilter::loadFile(), ccMesh::NormalizeNormals(), ccMinimumSpanningTreeForNormsDirection::OrientNormals(), ccEntityAction::orientNormalsFM(), ccEntityAction::orientNormalsMST(), orientNormalsWithGrids(), partialClone(), CommandOctreeNormal::process(), CommandInvertNormal::process(), CommandConvertNormalsToDipAndDipDir::process(), CommandConvertNormalsToSFs::process(), CommandOrientNormalsMST::process(), cloudViewer::visualization::MessageProcessor::ProcessMessage(), cloudViewer::pipelines::registration::RegistrationColoredICP(), cloudViewer::pipelines::registration::RegistrationICP(), removePoints(), ccMesh::RemoveVerticesByMask(), reserve(), resize(), ccMesh::resizeAssociatedCloud(), ResolveNormalsWithMST(), masc::PointFeature::retrieveField(), SaveScan(), PcdFilter::saveToFile(), DepthMapFileFilter::saveToFile(), ccMesh::SelectByIndex(), SelectByIndex(), cloudViewer::io::rpc::SetPointCloud(), ccMesh::SimplifyQuadricDecimation(), ccMesh::SimplifyVertexClustering(), ccMesh::SubdivideLoop(), ccMesh::SubdivideMidpoint(), swapPoints(), colmap::mvs::MvsTexturing::TextureMesh(), unroll(), StereogramDialog::updateFacetsFilter(), qM3C2Dialog::updateNormalComboBox(), cloudViewer::io::WritePointCloudToPLY(), and cloudViewer::io::WritePointCloudToXYZN().

◆ hasScalarFields()

◆ hasSensor()

bool ccPointCloud::hasSensor ( ) const

Returns whether the mesh as an associated sensor or not.

Definition at line 5579 of file ecvPointCloud.cpp.

References ccObject::isKindOf(), ccHObject::m_children, and CV_TYPES::SENSOR.

Referenced by ccComparisonDlg::ccComparisonDlg(), and ccEntityAction::computeNormals().

◆ HiddenPointRemoval()

std::tuple< std::shared_ptr< ccMesh >, std::vector< size_t > > ccPointCloud::HiddenPointRemoval ( const Eigen::Vector3d &  camera_location,
const double  radius 
) const

This is an implementation of the Hidden Point Removal operator described in Katz et. al. 'Direct Visibility of Point Sets', 2007.

Additional information about the choice of radius for noisy point clouds can be found in Mehra et. al. 'Visibility of Noisy Point Cloud Data', 2010.

Parameters
camera_locationAll points not visible from that location will be removed.
radiusThe radius of the sperical projection.

Definition at line 1430 of file PointCloudFactory.cpp.

References cloudViewer::geometry::Qhull::ComputeConvexHull(), LogError, Vector3Tpl< Type >::norm(), and size.

◆ hidePointsByScalarValue() [1/2]

void ccPointCloud::hidePointsByScalarValue ( ScalarType  minVal,
ScalarType  maxVal 
)

Hides points whose scalar values falls into an interval.

Values are taken from the current OUTPUT scalar field.

Parameters
minValminimum value (below, points are hidden)
maxValmaximum value (above, points are hidden)

Definition at line 2980 of file ecvPointCloud.cpp.

References count, CVLog::Error(), cloudViewer::PointCloudTpl< ccGenericPointCloud >::getCurrentOutScalarField(), ccObject::getName(), cloudViewer::ScalarField::getValue(), ccGenericPointCloud::m_pointsVisibility, POINT_HIDDEN, ccGenericPointCloud::resetVisibilityArray(), and cloudViewer::PointCloudTpl< ccGenericPointCloud >::size().

Referenced by ecvFilterByLabelDlg::apply().

◆ hidePointsByScalarValue() [2/2]

void ccPointCloud::hidePointsByScalarValue ( std::vector< ScalarType >  values)

Hides points whose scalar values falls into an interval.

Values are taken from the current OUTPUT scalar field.

Parameters
valuesscalar values (equal, points are hidden)

Definition at line 3008 of file ecvPointCloud.cpp.

References count, EPSILON_VALUE, CVLog::Error(), cloudViewer::PointCloudTpl< ccGenericPointCloud >::getCurrentOutScalarField(), ccObject::getName(), cloudViewer::ScalarField::getValue(), ccGenericPointCloud::m_pointsVisibility, POINT_HIDDEN, ccGenericPointCloud::resetVisibilityArray(), and cloudViewer::PointCloudTpl< ccGenericPointCloud >::size().

◆ initLOD()

bool ccPointCloud::initLOD ( )

Intializes the LOD structure.

Returns
success

Definition at line 5613 of file ecvPointCloud.cpp.

References ccPointCloudLOD::init(), and m_lod.

◆ interpolateColorsFrom()

◆ invalidateBoundingBox()

◆ invertNormals()

void ccPointCloud::invertNormals ( )

◆ IsEmpty()

virtual bool ccPointCloud::IsEmpty ( ) const
inlineoverridevirtual

◆ minimumFileVersion_MeOnly()

short ccPointCloud::minimumFileVersion_MeOnly ( ) const
overrideprotectedvirtual

Returns the minimum file version required to save this instance's own data To be overloaded (but still called ;) by subclass. Used internally by minimumFileVersion() to compute the overall minimum.

Reimplemented from ccGenericPointCloud.

Definition at line 4590 of file ecvPointCloud.cpp.

References ccSerializationHelper::GenericArrayToFileMinVersion(), grid(), gridCount(), hasFWF(), hasScalarFields(), m_fwfDescriptors, m_fwfWaveforms, m_normals, m_rgbColors, cloudViewer::PointCloudTpl< ccGenericPointCloud >::m_scalarFields, ccHObject::minimumFileVersion(), and ccGenericPointCloud::minimumFileVersion_MeOnly().

◆ NormalizeNormals()

ccPointCloud & ccPointCloud::NormalizeNormals ( )

Normalize point normals to length 1.`.

Definition at line 290 of file PointCloudFactory.cpp.

References ccNormalVectors::GetNormalPtr(), and Vector3Tpl< Type >::normalize().

Referenced by ccMesh::NormalizeNormals().

◆ normals()

◆ normalsAvailable()

bool ccPointCloud::normalsAvailable ( ) const
inlineoverridevirtual

Returns whether normals are available.

Reimplemented from cloudViewer::GenericIndexedCloud.

Definition at line 566 of file ecvPointCloud.h.

◆ normalsHaveChanged()

void ccPointCloud::normalsHaveChanged ( )
inline

Notify a modification of normals display parameters or contents.

Definition at line 280 of file ecvPointCloud.h.

Referenced by addNormAtIndex(), computeNormalsWithGrids(), ccCompass::estimateStructureNormals(), invertNormals(), reserveTheNormsTable(), resizeTheNormsTable(), setNormsTable(), and setPointNormalIndex().

◆ notifyGeometryUpdate()

void ccPointCloud::notifyGeometryUpdate ( )
overrideprotectedvirtual

Notifies all dependent entities that the geometry of this entity has changed

Reimplemented from ccHObject.

Definition at line 547 of file ecvPointCloud.cpp.

References ccHObject::notifyGeometryUpdate(), and releaseVBOs().

Referenced by append(), invalidateBoundingBox(), resize(), scale(), Translate(), and unalloactePoints().

◆ operator+()

ccPointCloud ccPointCloud::operator+ ( const ccPointCloud cloud) const
inline

Definition at line 252 of file ecvPointCloud.h.

◆ operator+=() [1/2]

const ccPointCloud & ccPointCloud::operator+= ( ccPointCloud addedCloud)

◆ operator+=() [2/2]

const ccPointCloud & ccPointCloud::operator+= ( const ccPointCloud cloud)

◆ operator=()

◆ OrientNormalsConsistentTangentPlane()

void ccPointCloud::OrientNormalsConsistentTangentPlane ( size_t  k)

Function to consistently orient estimated normals based on consistent tangent planes as described in Hoppe et al., "Surface Reconstruction from Unorganized Points", 1992.

Parameters
kk nearest neighbour for graph reconstruction for normal propagation.

Definition at line 1259 of file PointCloudFactory.cpp.

References cloudViewer::geometry::TetraMesh::CreateFromPointCloud(), Vector3Tpl< Type >::dot(), LogError, cloudViewer::geometry::KDTreeFlann::SearchKNN(), and size.

◆ OrientNormalsToAlignWithDirection()

bool ccPointCloud::OrientNormalsToAlignWithDirection ( const Eigen::Vector3d &  orientation_reference = Eigen::Vector3d(0.0, 0.0, 1.0))

Function to orient the normals of a point cloud.

Parameters
orientation_referenceNormals are oriented with respect to orientation_reference.

Definition at line 1206 of file PointCloudFactory.cpp.

References Vector3Tpl< PointCoordinateType >::fromArray(), LogWarning, normal, and size.

Referenced by convert().

◆ OrientNormalsTowardsCameraLocation()

bool ccPointCloud::OrientNormalsTowardsCameraLocation ( const Eigen::Vector3d &  camera_location = Eigen::Vector3d::Zero())

Function to orient the normals of a point cloud.

Parameters
camera_locationNormals are oriented with towards the camera_location.

Definition at line 1230 of file PointCloudFactory.cpp.

References LogWarning, normal, and size.

Referenced by convert().

◆ orientNormalsTowardViewPoint()

◆ orientNormalsWithFM()

bool ccPointCloud::orientNormalsWithFM ( unsigned char  level,
ecvProgressDialog pDlg = nullptr 
)

Orient normals with Fast Marching.

Definition at line 5574 of file ecvPointCloud.cpp.

References ccFastMarchingForNormsDirection::OrientNormals().

Referenced by define_ccPointCloud(), and ccEntityAction::orientNormalsFM().

◆ orientNormalsWithGrids()

◆ orientNormalsWithMST()

bool ccPointCloud::orientNormalsWithMST ( unsigned  kNN = 6,
ecvProgressDialog pDlg = nullptr 
)

Orient the normals with a Minimum Spanning Tree.

Definition at line 5568 of file ecvPointCloud.cpp.

References ccMinimumSpanningTreeForNormsDirection::OrientNormals().

Referenced by define_ccPointCloud(), ccEntityAction::orientNormalsMST(), and CommandOrientNormalsMST::process().

◆ PaintUniformColor()

ccPointCloud & ccPointCloud::PaintUniformColor ( const Eigen::Vector3d &  color)

Assigns each vertex in the ccMesh the same color.

Parameters
colorRGB colors of vertices.

Definition at line 1497 of file PointCloudFactory.cpp.

References color, and ecvColor::RgbTpl< Type >::FromEigen().

Referenced by ccMesh::PaintUniformColor().

◆ partialClone()

ccPointCloud * ccPointCloud::partialClone ( const cloudViewer::ReferenceCloud selection,
int *  warnings = nullptr,
bool  withChildEntities = true 
) const

Creates a new point cloud object from a ReferenceCloud (selection)

"Reference clouds" are a set of indexes referring to a real point cloud. See CClib documentation for more information about ReferenceClouds. Warning: the ReferenceCloud structure must refer to this cloud.

Parameters
[in]selectiona ReferenceCloud structure (pointing to source)
[out]warnings[optional] to determine if warnings (CTOR_ERRORS) occurred during the duplication process
[in]withChildEntitieswhether child entities should be transferred as well (see ccHObjectCaster::CloneChildren)

Definition at line 290 of file ecvPointCloud.cpp.

References ccPointCloud(), ccHObjectCaster::CloneChildren(), ccDrawableObject::colorsShown(), ccScalarField::computeMinAndMax(), ccWaveform::descriptorID(), CVLog::Error(), fwfData(), cloudViewer::ReferenceCloud::getAssociatedCloud(), getCurrentDisplayedScalarField(), ccScalarField::getGlobalShift(), cloudViewer::ScalarField::getName(), ccObject::getName(), cloudViewer::PointCloudTpl< ccGenericPointCloud >::getNumberOfScalarFields(), getPointColor(), cloudViewer::ReferenceCloud::getPointGlobalIndex(), getPointNormalIndex(), cloudViewer::PointCloudTpl< ccGenericPointCloud >::getPointPersistentPtr(), cloudViewer::PointCloudTpl< ccGenericPointCloud >::getScalarField(), cloudViewer::ScalarField::getValue(), grid(), gridCount(), hasColors(), hasFWF(), hasNormals(), ccScalarField::importParametersFrom(), ccObject::isEnabled(), ccDrawableObject::isVisible(), m_fwfDescriptors, m_fwfWaveforms, ccDrawableObject::normalsShown(), cloudViewer::ScalarField::resizeSafe(), result, ccScalarField::setGlobalShift(), cloudViewer::ScalarField::setValue(), ccDrawableObject::sfShown(), cloudViewer::PointCloudTpl< ccGenericPointCloud >::size(), cloudViewer::ReferenceCloud::size(), UpdateGridIndexes(), CVLog::Warning(), WRN_OUT_OF_MEM_FOR_COLORS, WRN_OUT_OF_MEM_FOR_FWF, WRN_OUT_OF_MEM_FOR_NORMALS, and WRN_OUT_OF_MEM_FOR_SFS.

Referenced by qFacets::createFacets(), createNewCloudFromVisibilitySelection(), ccCropTool::Crop(), qCSF::doAction(), qCanupoPlugin::doClassifyAction(), filterPointsByScalarValue(), GrainsAsEllipsoids::fitEllipsoidToGrain(), G3Point::G3PointAction::getBorders(), getMortarMaps(), ccPolyline::initWith(), KNNRegions(), masc::CorePoints::prepare(), CommandSubsample::process(), CommandExtractCCs::process(), CommandSORFilter::process(), CommandCPS::process(), CommandCSF::process(), ccPolyline::split(), unroll(), and GrainsAsEllipsoids::updateMeshAndLineSet().

◆ pointsHaveChanged()

void ccPointCloud::pointsHaveChanged ( )
inline

Notify a modification of points display parameters or contents.

Definition at line 284 of file ecvPointCloud.h.

◆ RandomDownSample()

std::shared_ptr< ccPointCloud > ccPointCloud::RandomDownSample ( double  sampling_ratio) const

Function to downsample input pointcloud into output pointcloud randomly.

The sample is performed by randomly selecting the index of the points in the pointcloud.

Parameters
sampling_ratioSampling ratio, the ratio of sample to total number of points in the pointcloud.

Definition at line 778 of file PointCloudFactory.cpp.

References LogError, cloudViewer::t::geometry::SelectByIndex(), and size.

◆ refreshBB()

void ccPointCloud::refreshBB ( )
inlineoverridevirtual

◆ releaseVBOs()

◆ removeGrids()

void ccPointCloud::removeGrids ( )
inline

Remove all associated grids.

Definition at line 458 of file ecvPointCloud.h.

◆ RemoveNonFinitePoints()

ccPointCloud & ccPointCloud::RemoveNonFinitePoints ( bool  remove_nan = true,
bool  remove_infinite = true 
)

Remove all points fromt he point cloud that have a nan entry, or infinite entries.

Also removes the corresponding normals and color entries.

Parameters
remove_nanRemove NaN values from the ccPointCloud.
remove_infiniteRemove infinite values from the ccPointCloud.

Definition at line 325 of file PointCloudFactory.cpp.

References ccScalarField::computeMinAndMax(), cloudViewer::ScalarField::getValue(), LogDebug, LogError, LogWarning, CVLog::Print(), cloudViewer::ScalarField::resizeSafe(), and cloudViewer::ScalarField::setValue().

Referenced by cloudViewer::io::ReadPointCloud().

◆ removePoints()

void ccPointCloud::removePoints ( size_t  index)
overrideprotectedvirtual

◆ RemoveRadiusOutliers()

std::tuple< std::shared_ptr< ccPointCloud >, std::vector< size_t > > ccPointCloud::RemoveRadiusOutliers ( size_t  nb_points,
double  search_radius 
) const

Function to remove points that have less than nb_points in a sphere of a given radius.

Parameters
nb_pointsNumber of points within the radius.
search_radiusRadius of the sphere.

Definition at line 833 of file PointCloudFactory.cpp.

References Vector3Tpl< double >::fromArray(), LogWarning, cloudViewer::geometry::KDTreeFlann::SearchRadius(), cloudViewer::t::geometry::SelectByIndex(), cloudViewer::geometry::KDTreeFlann::SetGeometry(), and size.

◆ RemoveStatisticalOutliers()

std::tuple< std::shared_ptr< ccPointCloud >, std::vector< size_t > > ccPointCloud::RemoveStatisticalOutliers ( size_t  nb_neighbors,
double  std_ratio 
) const

Function to remove points that are further away from their nb_neighbor neighbors in average.

Parameters
nb_neighborsNumber of neighbors around the target point.
std_ratioStandard deviation ratio.

Definition at line 866 of file PointCloudFactory.cpp.

References Vector3Tpl< double >::fromArray(), LogWarning, cloudViewer::geometry::KDTreeFlann::SearchKNN(), cloudViewer::t::geometry::SelectByIndex(), cloudViewer::geometry::KDTreeFlann::SetGeometry(), size, G3Point::std_dev(), x, and y.

◆ removeVisiblePoints()

bool ccPointCloud::removeVisiblePoints ( VisibilityTableType visTable = nullptr,
std::vector< int > *  newIndexes = nullptr 
)
overridevirtual

Removes all the 'visible' points (as defined by the visibility array)

Parameters
visTablevisibility table (optional, otherwise the cloud's default one will be used)
newIndexesoptional: stores the new indexes of the points (either an index >= 0 if kept, or -1 if not). Must be initially empty or have the same size as the original cloud.
Returns
success

Implements ccGenericPointCloud.

Definition at line 3134 of file ecvPointCloud.cpp.

References clearLOD(), ccGenericPointCloud::deleteOctree(), CVLog::Error(), grid(), ccGenericPointCloud::isVisibilityTableInstantiated(), m_grids, ccGenericPointCloud::m_pointsVisibility, POINT_VISIBLE, refreshBB(), resize(), cloudViewer::PointCloudTpl< ccGenericPointCloud >::size(), swapPoints(), and UpdateGridIndexes().

Referenced by createNewCloudFromVisibilitySelection().

◆ reserve()

bool ccPointCloud::reserve ( unsigned  numberOfPoints)
overridevirtual

Reserves memory for all the active features.

This method is meant to be called before increasing the cloud population. Only the already allocated features will be re-reserved.

Returns
true if ok, false if there's not enough memory

Reimplemented from cloudViewer::PointCloudTpl< ccGenericPointCloud >.

Reimplemented in ccSymbolCloud.

Definition at line 1452 of file ecvPointCloud.cpp.

References CVLog::Error(), hasColors(), hasFWF(), hasNormals(), m_fwfWaveforms, m_normals, cloudViewer::PointCloudTpl< ccGenericPointCloud >::m_points, m_rgbColors, cloudViewer::PointCloudTpl< ccGenericPointCloud >::reserve(), reserveTheFWFTable(), reserveTheNormsTable(), reserveTheRGBTable(), and cloudViewer::PointCloudTpl< ccGenericPointCloud >::size().

Referenced by ccPolyline::add(), ccPointPairRegistrationDlg::addAlignedPoint(), qCanupo2DViewDialog::addOrSelectPoint(), ccGraphicalSegmentationTool::addPointToPolyline(), ccPointPairRegistrationDlg::addReferencePoint(), append(), ccTracePolylineTool::ccTracePolylineTool(), MeshWrapper< Real >::checkVertexCapacity(), ccPolyline::Circle(), qVoxFallProcess::Compute(), ccGBLSensor::computeDepthBuffer(), ccEntityAction::computeNormals(), ccTopologyRelation::constructGraphic(), DistanceMapGenerationTool::ConvertConicalMapToMesh(), DistanceMapGenerationTool::ConvertMapToCloud(), DistanceMapGenerationTool::ConvertProfileToMesh(), ccRasterGrid::convertToCloud(), vtk2cc::ConvertToMultiPolylines(), pcl2cc::CopyXYZ(), ccPolyline::createNewPolylinesFromSelection(), ccGraphicalSegmentationTool::doActionUseExistingPolyline(), ccCompass::estimateP21(), ccCompass::estimateStructureNormals(), ccPointListPickingDlg::exportToNewCloud(), ccPointListPickingDlg::exportToNewPolyline(), ccContourExtractor::ExtractConcaveHull2D(), ccContourExtractor::ExtractFlatContour(), ccQuadric::Fit(), FromFbxMesh(), ccRasterizeTool::generateContours(), GetConeProfile(), cvDistanceTool::getOutput(), cvProtractorTool::getOutput(), ccCameraSensor::getOwnBB(), ccGBLSensor::getOwnBB(), FastGlobalRegistrationFilter::getParametersFromDialog(), STEPFilter::importStepFile(), ccGenericPrimitive::init(), ProfileLoader::Load(), STLFilter::loadASCIIFile(), STLFilter::loadBinaryFile(), LoadCloud(), AsciiFilter::loadCloudFromFormatedAsciiStream(), CSVMatrixFilter::loadFile(), ObjFilter::loadFile(), OFFFilter::loadFile(), PTXFilter::loadFile(), VTKFilter::loadFile(), SalomeHydroFilter::loadFile(), SinusxFilter::loadFile(), LASFWFFilter::loadFile(), RDBFilter::loadFile(), LoadScan(), QVTKWidgetCustom::mouseMoveEvent(), ccTracePolylineTool::onItemPicked(), ccGenericPrimitive::operator+=(), ccCameraSensor::orthoRectifyAsCloud(), masc::ContextBasedFeature::prepare(), CommandCrop2D::process(), ccMesh::pushSubdivide(), ccSymbolCloud::reserve(), qCanupo2DViewDialog::resetBoundary(), ccPolyline::samplePoints(), ccPolyline::smoothChaikin(), DistanceMapGenerationDlg::toggleOverlayGrid(), Cloth::toMesh(), qCanupoTools::TrainClassifier(), ccMesh::TriangulateTwoPolylines(), and GrainsAsEllipsoids::updateMeshAndLineSet().

◆ reserveTheFWFTable()

bool ccPointCloud::reserveTheFWFTable ( )

Reserves the FWF table.

Definition at line 1382 of file ecvPointCloud.cpp.

References CVLog::Error(), m_fwfWaveforms, cloudViewer::PointCloudTpl< ccGenericPointCloud >::m_points, and CVLog::Warning().

Referenced by append(), and reserve().

◆ reserveTheNormsTable()

◆ reserveThePointsTable()

bool ccPointCloud::reserveThePointsTable ( unsigned  _numberOfPoints)

Reserves memory to store the points coordinates.

Before adding points to the cloud (with addPoint()) be sure to reserve the necessary amount of memory with this method. If the number of new elements is smaller than the actual one, nothing will happen.

Parameters
_numberOfPointsnumber of points to reserve the memory for
Returns
true if ok, false if there's not enough memory

Definition at line 1191 of file ecvPointCloud.cpp.

References cloudViewer::PointCloudTpl< ccGenericPointCloud >::m_points.

Referenced by ccMesh::addEigenVertices(), BallPivoting::BallPivoting(), ccPointCloud(), contourPoly(), contourPoly2(), define_ccPointCloud(), poisson::ExtractMesh(), ccMeasurementDevice::fitPlaneToPoints(), From(), cloudViewer::t::geometry::FromLegacyPointCloud(), getDensity(), getMortarMaps(), SoiFilter::loadFile(), PlyFilter::loadFile(), DistanceMapGenerationDlg::loadOverlaySymbols(), prepareCloud(), cloudViewer::visualization::MessageProcessor::ProcessMessage(), cloudViewer::io::ReadModelUsingAssimp(), cloudViewer::io::ReadTriangleMeshFromOBJ(), ccMesh::reserveAssociatedCloud(), LasCloudChunk::reserveSize(), and rotY().

◆ reserveTheRGBTable()

bool ccPointCloud::reserveTheRGBTable ( )

Reserves memory to store the RGB colors.

Before adding colors to the cloud (with addRGBColor()) be sure to reserve the necessary amount of memory with this method. This method reserves memory for as many colors as the number of points in the cloud (effectively stored or reserved).

Returns
true if ok, false if there's not enough memory

Definition at line 1200 of file ecvPointCloud.cpp.

References colorsHaveChanged(), CVLog::Error(), CCShareable::link(), cloudViewer::PointCloudTpl< ccGenericPointCloud >::m_points, m_rgbColors, CCShareable::release(), ccArray< Type, N, ComponentType >::reserveSafe(), and CVLog::Warning().

Referenced by MeshWrapper< Real >::addColor(), addEigenColors(), addRGBColor(), ccMesh::addVertexColors(), append(), BallPivoting::BallPivoting(), contourPoly(), contourPoly2(), ccRasterGrid::convertToCloud(), vtk2cc::ConvertToPointCloud(), pcl2cc::CopyRGB(), copyRGBColors(), poisson::ExtractMesh(), cloudViewer::pipelines::integration::UniformTSDFVolume::ExtractTriangleMesh(), From(), FromFbxMesh(), cloudViewer::t::geometry::FromLegacyPointCloud(), getMortarMaps(), LasScalarFieldLoader::handleRGBValue(), LoadCloud(), CSVMatrixFilter::loadFile(), PTXFilter::loadFile(), VTKFilter::loadFile(), SoiFilter::loadFile(), LASFWFFilter::loadFile(), LASFilter::loadFile(), RDBFilter::loadFile(), PlyFilter::loadFile(), LoadScan(), ccGenericPrimitive::operator+=(), ccCameraSensor::orthoRectifyAsCloud(), prepareCloud(), cloudViewer::io::ReadModelUsingAssimp(), cloudViewer::io::ReadTriangleMeshFromOBJ(), reserve(), ccMesh::reserveAssociatedCloud(), rotY(), ccGenericMesh::samplePoints(), ccMesh::SelectByIndex(), setRGBColor(), and qCanupoTools::TrainClassifier().

◆ resize()

bool ccPointCloud::resize ( unsigned  numberOfPoints)
overridevirtual

Resizes all the active features arrays.

This method is meant to be called after having increased the cloud population (if the final number of inserted point is lower than the reserved size). Otherwise, it fills all new elements with blank values.

Returns
true if ok, false if there's not enough memory

Reimplemented from cloudViewer::PointCloudTpl< ccGenericPointCloud >.

Reimplemented in ccSymbolCloud.

Definition at line 1476 of file ecvPointCloud.cpp.

References covariances_, ccArray< Type, N, ComponentType >::currentSize(), CVLog::Error(), hasColors(), HasCovariances(), hasFWF(), hasNormals(), ccObject::isLocked(), m_fwfWaveforms, m_normals, cloudViewer::PointCloudTpl< ccGenericPointCloud >::m_points, m_rgbColors, notifyGeometryUpdate(), cloudViewer::PointCloudTpl< ccGenericPointCloud >::resize(), resizeTheFWFTable(), resizeTheNormsTable(), resizeTheRGBTable(), and cloudViewer::PointCloudTpl< ccGenericPointCloud >::size().

Referenced by ccMesh::ccMesh(), ccPointPairRegistrationDlg::clear(), qM3C2Process::Compute(), ComputeKmeansClustering(), ccMesh::computePerVertexNormals(), DistanceMapGenerationTool::ConvertMapToCloud(), vtk2cc::ConvertToPointCloud(), ccMesh::CreateBox(), ccMesh::CreateCone(), ccMesh::CreateCylinder(), ccMesh::CreateMobius(), ccMesh::CreatePlane(), ccMesh::CreateSphere(), ccMesh::CreateTorus(), cc2DLabel::drawMeOnly3D(), ccMesh::FilterSharpen(), ccMesh::FilterSmoothLaplacian(), ccMesh::FilterSmoothSimple(), ccMesh::FilterSmoothTaubin(), cloudViewer::t::geometry::FromLegacyPointCloud(), AsciiFilter::loadCloudFromFormatedAsciiStream(), PTXFilter::loadFile(), SinusxFilter::loadFile(), LASFilter::loadFile(), LoadScan(), ccCameraSensor::orthoRectifyAsCloud(), cloudViewer::io::ReadPointCloudFromPLY(), cloudViewer::io::ReadPointCloudFromPTS(), cloudViewer::io::ReadTriangleMeshFromPLY(), ccPointPairRegistrationDlg::removeAlignedPoint(), ccMesh::RemoveDuplicatedVertices(), ccPointPairRegistrationDlg::removeRefPoint(), ccMesh::RemoveUnreferencedVertices(), ccMesh::RemoveVerticesByMask(), removeVisiblePoints(), ccSymbolCloud::resize(), ccMesh::resizeAssociatedCloud(), ccMesh::SimplifyQuadricDecimation(), ccMesh::SimplifyVertexClustering(), ccMesh::SubdivideLoop(), ccPointPairRegistrationDlg::unstackAligned(), ccPointPairRegistrationDlg::unstackRef(), GrainsAsEllipsoids::updateMeshAndLineSet(), and ccGraphicalSegmentationTool::updatePolyLine().

◆ resizeTheFWFTable()

bool ccPointCloud::resizeTheFWFTable ( )

Resizes the FWF table.

Definition at line 1433 of file ecvPointCloud.cpp.

References CVLog::Error(), m_fwfWaveforms, cloudViewer::PointCloudTpl< ccGenericPointCloud >::m_points, and CVLog::Warning().

Referenced by resize().

◆ resizeTheNormsTable()

bool ccPointCloud::resizeTheNormsTable ( )

Resizes the compressed normals array.

If possible, the normals array is resized to fit exactly the number of points in the cloud (effictively stored or reserved). If the new size is inferior to the actual one, the last elements will be deleted. Otherwise, the array is filled with blank elements. WARNING: don't try to "add" any element on a resized array...

Returns
true if ok, false if there's not enough memory

Definition at line 1281 of file ecvPointCloud.cpp.

References CVLog::Error(), CCShareable::link(), m_normals, cloudViewer::PointCloudTpl< ccGenericPointCloud >::m_points, normalsHaveChanged(), CCShareable::release(), ccArray< Type, N, ComponentType >::resizeSafe(), and CVLog::Warning().

Referenced by qM3C2Process::Compute(), computeNormalsWithGrids(), computeNormalsWithOctree(), ccMesh::CreateFromPointCloudAlphaShape(), define_ccPointCloud(), qHoughNormals::doAction(), ccMesh::FilterSharpen(), ccMesh::FilterSmoothLaplacian(), ccMesh::FilterSmoothSimple(), ccMesh::FilterSmoothTaubin(), cloudViewer::io::ReadTriangleMeshFromOBJ(), cloudViewer::io::ReadTriangleMeshFromPLY(), resize(), ccMesh::resizeAssociatedCloud(), ccMesh::SimplifyQuadricDecimation(), ccMesh::SimplifyVertexClustering(), and ccMesh::SubdivideLoop().

◆ resizeTheRGBTable()

bool ccPointCloud::resizeTheRGBTable ( bool  fillWithWhite = false)

Resizes the RGB colors array.

If possible, the colors array is resized to fit exactly the number of points in the cloud (effectively stored or reserved). If the new size is inferior to the actual one, the last elements will be deleted. Otherwise, the array is filled with zeros (default behavior) or "white" colors (is fillWithWhite). WARNING: don't try to "add" any element on a resized array...

Parameters
fillWithWhitewhether to fill new array elements with zeros (false) or white color (true)
Returns
true if ok, false if there's not enough memory

Definition at line 1226 of file ecvPointCloud.cpp.

References colorsHaveChanged(), CVLog::Error(), CCShareable::link(), cloudViewer::PointCloudTpl< ccGenericPointCloud >::m_points, m_rgbColors, CCShareable::release(), ccArray< Type, N, ComponentType >::resizeSafe(), and CVLog::Warning().

Referenced by ccCloudLayersHelper::ccCloudLayersHelper(), colorize(), ccKdTree::convertCellIndexToRandomColor(), convertCurrentScalarFieldToColors(), ccMesh::convertMaterialsToVertexColors(), convertNormalToRGB(), ccMesh::CreateFromPointCloudAlphaShape(), ccCropTool::Crop(), GrainsAsEllipsoids::exportResultsAsCloud(), ccMesh::FilterSharpen(), ccMesh::FilterSmoothLaplacian(), ccMesh::FilterSmoothSimple(), ccMesh::FilterSmoothTaubin(), interpolateColorsFrom(), ccColorFromScalarDlg::onApply(), cloudViewer::io::ReadPointCloudFromPLY(), cloudViewer::io::ReadPointCloudFromPTS(), cloudViewer::io::ReadTriangleMeshFromPLY(), resize(), ccMesh::resizeAssociatedCloud(), cloudViewer::pipelines::color_map::SetGeometryColorAverage(), setRGBColorByBanding(), setRGBColorByHeight(), setRGBColorWithCurrentScalarField(), ccEntityAction::sfConvertToRandomRGB(), ccMesh::SimplifyQuadricDecimation(), ccMesh::SimplifyVertexClustering(), ccMesh::SubdivideLoop(), and GrainsAsEllipsoids::updateMeshAndLineSet().

◆ rgbColors()

◆ Rotate()

ccPointCloud & ccPointCloud::Rotate ( const Eigen::Matrix3d &  R,
const Eigen::Vector3d &  center 
)
overridevirtual

Apply rotation to the geometry coordinates and normals. Given a rotation matrix $R$, and center $c$, a given point $p$ is transformed according to $R (p - c) + c$.

Parameters
RA 3x3 rotation matrix
centerRotation center that is used for the rotation.

Reimplemented from ccHObject.

Definition at line 2624 of file ecvPointCloud.cpp.

References applyRigidTransformation(), covariances_, ccHObject::RotateCovariances(), ccGLMatrixTpl< T >::setRotation(), and ccGLMatrixTpl< T >::shiftRotationCenter().

Referenced by ccPolyline::Rotate().

◆ Scale()

ccPointCloud & ccPointCloud::Scale ( const double  s,
const Eigen::Vector3d &  center 
)
overridevirtual

Apply scaling to the geometry coordinates. Given a scaling factor $s$, and center $c$, a given point $p$ is transformed according to $s (p - c) + c$.

Parameters
scaleThe scale parameter that is multiplied to the points/vertices of the geometry.
centerScale center that is used to resize the geometry.

Reimplemented from ccHObject.

Definition at line 2615 of file ecvPointCloud.cpp.

References scale().

Referenced by ccMesh::Scale(), and ccPolyline::Scale().

◆ scale()

◆ SegmentPlane()

std::tuple< Eigen::Vector4d, std::vector< size_t > > ccPointCloud::SegmentPlane ( const double  distance_threshold = 0.01,
const int  ransac_n = 3,
const int  num_iterations = 100 
) const

Segment ccPointCloud plane using the RANSAC algorithm.

Parameters
distance_thresholdMax distance a point can be from the plane model, and still be considered an inlier.
ransac_nNumber of initial points to be considered inliers in each iteration.
num_iterationsNumber of iterations.
Returns
Returns the plane model ax + by + cz + d = 0 and the indices of the plane inliers.

Definition at line 139 of file PointCloudSegmentation.cpp.

References ccMesh::ComputeTrianglePlane(), Utils::distance(), cloudViewer::geometry::EvaluateRANSACBasedOnDistance(), cloudViewer::geometry::GetPlaneFromPoints(), cloudViewer::LessThanEpsilon(), LogDebug, LogError, result, size, and std::swap().

Referenced by ccEntityAction::RansacSegmentation().

◆ SelectByIndex()

std::shared_ptr< ccPointCloud > ccPointCloud::SelectByIndex ( const std::vector< size_t > &  indices,
bool  invert = false 
) const

◆ setCoordFromSF()

◆ setCurrentDisplayedScalarField()

void ccPointCloud::setCurrentDisplayedScalarField ( int  index)

Sets the currently displayed scalar field.

Warning: this scalar field will automatically be set as the OUTPUT one!

Definition at line 3227 of file ecvPointCloud.cpp.

References cloudViewer::PointCloudTpl< ccGenericPointCloud >::getScalarField(), m_currentDisplayedScalarField, m_currentDisplayedScalarFieldIndex, and cloudViewer::PointCloudTpl< ccGenericPointCloud >::setCurrentOutScalarField().

Referenced by ccRasterizeTool::activeLayerChanged(), LasCloudChunk::addLasFieldsToCloud(), append(), ccScalarFieldArithmeticsDlg::Apply(), ccComparisonDlg::applyAndExit(), ccLibAlgorithms::ApplyCCLibAlgorithm(), ccComparisonDlg::cancelAndExit(), ccColorFromScalarDlg::ccColorFromScalarDlg(), masc::Classifier::classify(), qCanupoProcess::Classify(), qM3C2Process::Compute(), qVoxFallProcess::Compute(), ccComparisonDlg::computeApproxDistances(), ccComparisonDlg::computeDistances(), ccLibAlgorithms::ComputeGeomCharacteristic(), DistanceMapGenerationTool::ComputeRadialDist(), ccKdTree::convertCellIndexToSF(), ccVolumeCalcTool::convertGridToCloud(), ccVolumeCalcTool::ConvertGridToCloud(), ccRasterizeTool::convertGridToCloud(), DistanceMapGenerationTool::ConvertMapToCloud(), ccEntityAction::convertNormalsTo(), vtk2cc::ConvertToMultiPolylines(), vtk2cc::ConvertToPointCloud(), pcl2cc::CopyScalarField(), ccMeasurementDevice::createScalarFieldForCloud(), ccCropTool::Crop(), define_ccPointCloud(), deleteAllScalarFields(), deleteScalarField(), qPCV::doAction(), qPoissonRecon::doAction(), ccCompass::estimateStructureNormals(), masc::Classifier::evaluate(), exportCoordToSF(), exportNormalToSF(), qFacets::extractFacets(), TreeIso::Final_seg_pcd(), From(), ccRasterizeTool::generateHillshade(), getMortarMaps(), ccEntityAction::importToSF(), TreeIso::Init_seg_pcd(), TreeIso::Intermediate_seg_pcd(), ccEntityAction::interpolateSFs(), ccCloudLayersHelper::keepCurrentSFVisible(), LoadCloud(), AsciiFilter::loadCloudFromFormatedAsciiStream(), PTXFilter::loadFile(), VTKFilter::loadFile(), LASFWFFilter::loadFile(), RDBFilter::loadFile(), PlyFilter::loadFile(), LoadScan(), operator=(), ccFastMarchingForNormsDirection::OrientNormals(), ccGenericPointCloud::pointPicking(), CommandSFConvertToRGB::process(), CommandStatTest::process(), CommandICP::process(), CommandRasterize::process(), PCVCommand::Process(), CommandRemoveSF::removeSF(), ResolveNormalsWithMST(), ccEntityAction::rgbGaussianFilter(), ccEntityAction::sfAddIdField(), ccEntityAction::sfGaussianFilter(), and ccEntityAction::statisticalTest().

◆ setEigenColor()

void ccPointCloud::setEigenColor ( size_t  index,
const Eigen::Vector3d &  color 
)

◆ setEigenColors()

void ccPointCloud::setEigenColors ( const std::vector< Eigen::Vector3d > &  colors)

Definition at line 1641 of file ecvPointCloud.cpp.

References colors, m_rgbColors, and setPointColor().

Referenced by addEigenColors(), and ccMesh::setVertexColors().

◆ setEigenNormal()

void ccPointCloud::setEigenNormal ( size_t  index,
const Eigen::Vector3d &  normal 
)

◆ setEigenNormals()

void ccPointCloud::setEigenNormals ( const std::vector< Eigen::Vector3d > &  normals)

Definition at line 1616 of file ecvPointCloud.cpp.

References m_normals, normals(), and setPointNormal().

Referenced by addEigenNorms(), and ccMesh::setVertexNormals().

◆ setNormsTable()

void ccPointCloud::setNormsTable ( NormsIndexesTableType norms)

Sets the (compressed) normals table.

Definition at line 1914 of file ecvPointCloud.cpp.

References CCShareable::link(), m_normals, normalsHaveChanged(), and CCShareable::release().

Referenced by qM3C2Process::Compute(), and ObjFilter::loadFile().

◆ setPointColor() [1/3]

◆ setPointColor() [2/3]

void ccPointCloud::setPointColor ( size_t  pointIndex,
const ecvColor::Rgba col 
)

Definition at line 1658 of file ecvPointCloud.cpp.

References ecvColor::FromRgbaToRgb(), and setPointColor().

◆ setPointColor() [3/3]

void ccPointCloud::setPointColor ( size_t  pointIndex,
const Eigen::Vector3d &  col 
)

Definition at line 1662 of file ecvPointCloud.cpp.

References ecvColor::RgbTpl< Type >::FromEigen(), and setPointColor().

◆ setPointNormal()

◆ setPointNormalIndex()

void ccPointCloud::setPointNormalIndex ( size_t  pointIndex,
CompressedNormType  norm 
)

Sets a particular point compressed normal.

WARNING: normals must be enabled.

Definition at line 1671 of file ecvPointCloud.cpp.

References m_normals, normalsHaveChanged(), and ccArray< Type, N, ComponentType >::setValue().

Referenced by qM3C2Process::Compute(), computeNormalsWithOctree(), orientNormalsTowardViewPoint(), orientNormalsWithGrids(), and setPointNormal().

◆ setPointNormals()

void ccPointCloud::setPointNormals ( const std::vector< CCVector3 > &  normals)

◆ setRGBColor() [1/2]

bool ccPointCloud::setRGBColor ( ColorCompType  r,
ColorCompType  g,
ColorCompType  b 
)
inline

Set a unique color for the whole cloud (shortcut)

Color array is automatically allocated if necessary.

Parameters
rred component
ggreen component
bblue component
Returns
success

Definition at line 778 of file ecvPointCloud.h.

Referenced by ecvTools::AddPointCloud(), ccCloudLayersHelper::apply(), ExtractSIFT::compute(), GeneralFilters::compute(), ProjectionFilter::compute(), CorrespondenceMatching::compute(), TemplateAlignment::compute(), ecvTools::GetClousterGroup(), ccGenericPrimitive::operator+=(), ResolveNormalsWithMST(), ccPolyline::samplePoints(), ccEntityAction::setColor(), ccFacet::setColor(), and setRGBColorByHeight().

◆ setRGBColor() [2/2]

bool ccPointCloud::setRGBColor ( const ecvColor::Rgb col)

Set a unique color for the whole cloud.

Color array is automatically allocated if necessary.

Parameters
colRGB color (size: 3)
Returns
success

Definition at line 2084 of file ecvPointCloud.cpp.

References colors, colorsHaveChanged(), ccDrawableObject::enableTempColor(), ccArray< Type, N, ComponentType >::fill(), hasColors(), m_grids, m_rgbColors, and reserveTheRGBTable().

◆ setRGBColorByBanding()

bool ccPointCloud::setRGBColorByBanding ( unsigned char  dim,
double  freq 
)

Assigns color to points by 'banding'.

Banding is performed along the specified dimension Color array is automatically allocated if necessary.

Parameters
dimbanding dimension (0:X, 1:Y, 2:Z)
freqbanding frequency
Returns
success

Definition at line 1957 of file ecvPointCloud.cpp.

References colorsHaveChanged(), count, ccDrawableObject::enableTempColor(), cloudViewer::PointCloudTpl< ccGenericPointCloud >::getPoint(), hasColors(), M_PI, m_rgbColors, ecvColor::MAX, resizeTheRGBTable(), ccArray< Type, N, ComponentType >::setValue(), cloudViewer::PointCloudTpl< ccGenericPointCloud >::size(), Tuple3Tpl< Type >::u, CVLog::Warning(), and z.

Referenced by CommandColorBanding::process(), and ccEntityAction::setColorGradient().

◆ setRGBColorByHeight()

bool ccPointCloud::setRGBColorByHeight ( unsigned char  heightDim,
ccColorScale::Shared  colorScale 
)

Assigns color to points proportionnaly to their 'height'.

Height is defined wrt to the specified dimension (heightDim). Color array is automatically allocated if necessary.

Parameters
heightDimramp dimension (0:X, 1:Y, 2:Z)
colorScalecolor scale to use
Returns
success

Definition at line 1996 of file ecvPointCloud.cpp.

References ecvColor::black(), colorsHaveChanged(), count, ccDrawableObject::enableTempColor(), CVLog::Error(), cloudViewer::BoundingBoxTpl< T >::getDiagVec(), ccGenericPointCloud::getOwnBB(), cloudViewer::PointCloudTpl< ccGenericPointCloud >::getPoint(), hasColors(), height, cloudViewer::LessThanEpsilon(), m_rgbColors, cloudViewer::BoundingBoxTpl< T >::minCorner(), resizeTheRGBTable(), setRGBColor(), ccArray< Type, N, ComponentType >::setValue(), cloudViewer::PointCloudTpl< ccGenericPointCloud >::size(), and Tuple3Tpl< Type >::u.

Referenced by ccEntityAction::setColorGradient().

◆ setRGBColorWithCurrentScalarField()

◆ sfColorScaleShown()

bool ccPointCloud::sfColorScaleShown ( ) const

Returns whether color scale should be displayed or not.

Definition at line 1511 of file ecvPointCloud.cpp.

References m_sfColorScaleDisplayed.

Referenced by define_ccPointCloud(), drawMeOnly(), ccPropertiesTreeDelegate::fillSFWithPointCloud(), and ccGenericMesh::handleColorRamp().

◆ showSFColorsScale()

void ccPointCloud::showSFColorsScale ( bool  state)

◆ shrinkToFit()

◆ swapPoints()

void ccPointCloud::swapPoints ( unsigned  firstIndex,
unsigned  secondIndex 
)
overrideprotectedvirtual

◆ testVisibility()

unsigned char ccPointCloud::testVisibility ( const CCVector3 P) const
overridevirtual

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 5590 of file ecvPointCloud.cpp.

References ccGBLSensor::checkVisibility(), CV_TYPES::GBL_SENSOR, ccObject::isA(), ccHObject::m_children, m_visibilityCheckEnabled, and POINT_VISIBLE.

◆ toFile_MeOnly()

bool ccPointCloud::toFile_MeOnly ( QFile &  out,
short  dataVersion 
) const
overrideprotectedvirtual

Save own object data.

Called by 'toFile' (recursive scheme) To be overloaded (but still called ;) by subclass.

Parameters
outoutput file
dataVersiontarget file version for compatibility control

Reimplemented from ccGenericPointCloud.

Definition at line 4263 of file ecvPointCloud.cpp.

◆ Transform()

◆ Translate() [1/2]

ccPointCloud& ccPointCloud::Translate ( const CCVector3 T)
inline

Definition at line 979 of file ecvPointCloud.h.

References Vector3Tpl< double >::fromArray().

◆ Translate() [2/2]

ccPointCloud & ccPointCloud::Translate ( const Eigen::Vector3d &  translation,
bool  relative = true 
)
overridevirtual

Apply translation to the geometry coordinates.

Parameters
translationA 3D vector to transform the geometry.
relativeIf true, the translation is directly applied to the geometry. Otherwise, the geometry center is moved to the translation.

Reimplemented from ccHObject.

Definition at line 2572 of file ecvPointCloud.cpp.

References computeGravityCenter(), count, ccHObject::filterChildren(), ccGenericPointCloud::getOctree(), invalidateBoundingBox(), cloudViewer::LessThanEpsilon(), ccHObject::m_glTransHistory, notifyGeometryUpdate(), octree, cloudViewer::PointCloudTpl< ccGenericPointCloud >::point(), CV_TYPES::POINT_KDTREE, ccGLMatrixTpl< T >::setTranslation(), cloudViewer::PointCloudTpl< ccGenericPointCloud >::size(), Tuple3Tpl< Type >::x, Tuple3Tpl< Type >::y, and Tuple3Tpl< Type >::z.

Referenced by getMortarMaps(), ccMesh::Translate(), and ccPolyline::Translate().

◆ triangulateGrid()

◆ unalloactePoints()

void ccPointCloud::unalloactePoints ( )

Erases the cloud points.

Prefer ccPointCloud::clear by default.

Warning
DANGEROUS

Definition at line 537 of file ecvPointCloud.cpp.

References ccGenericPointCloud::clear(), notifyGeometryUpdate(), cloudViewer::PointCloudTpl< ccGenericPointCloud >::reset(), and showSFColorsScale().

Referenced by clear(), and ccGenericPrimitive::init().

◆ unallocateColors()

◆ unallocateNorms()

◆ UniformDownSample()

std::shared_ptr< ccPointCloud > ccPointCloud::UniformDownSample ( size_t  every_k_points) const

Function to downsample input ccPointCloud into output ccPointCloud uniformly.

The sample is performed in the order of the points with the 0-th point always chosen, not at random.

Parameters
every_k_pointsSample rate, the selected point indices are [0, k, 2k].

Definition at line 762 of file PointCloudFactory.cpp.

References LogWarning, cloudViewer::t::geometry::SelectByIndex(), and size.

Referenced by convert().

◆ unroll()

ccPointCloud * ccPointCloud::unroll ( UnrollMode  mode,
UnrollBaseParams params,
bool  exportDeviationSF = false,
double  startAngle_deg = 0.0,
double  stopAngle_deg = 360.0,
cloudViewer::GenericProgressCallback progressCb = nullptr 
) const

Unrolls the cloud and its normals on a cylinder or a cone.

This method is redundant with the "developCloudOnCylinder" method of CCLib, apart that it can also handle the cloud normals.

Parameters
modeunrolling mode
paramsunrolling parameters (must match the unrolling mode)
exportDeviationSFto export the deviation fro the ideal cone as a scalar field
startAngle_degstart angle (in degrees) - 0 corresponds to +X (east)
stopAngle_degstop angle (in degrees)
progressCbfor progress notification
Returns
the unrolled point cloud

Definition at line 3694 of file ecvPointCloud.cpp.

References cloudViewer::ReferenceCloud::addPointIndex(), ccPointCloud::UnrollConeParams::apex, ccPointCloud::UnrollBaseParams::axisDim, cloudViewer::ReferenceCloud::capacity(), cloudViewer::utility::ceil(), ccPointCloud::UnrollCylinderParams::center, clone(), cloudViewer::ScalarField::computeMinAndMax(), CONE, ccPointCloud::UnrollConeParams::coneAngle_deg, CYLINDER, cloudViewer::DegreesToRadians(), CVLog::Error(), ccObject::getName(), cloudViewer::PointCloudTpl< ccGenericPointCloud >::getPoint(), cloudViewer::ReferenceCloud::getPointGlobalIndex(), getPointNormal(), hasNormals(), M_PI, Vector3Tpl< Type >::normalize(), cloudViewer::NormalizedProgress::oneStep(), partialClone(), ProjectOnCone(), ProjectOnCylinder(), ccPointCloud::UnrollBaseParams::radius, ccGenericPointCloud::refreshBB(), cloudViewer::ReferenceCloud::reserve(), s_deviationSFName, cloudViewer::GenericProgressCallback::setInfo(), cloudViewer::GenericProgressCallback::setMethodTitle(), ccObject::setName(), cloudViewer::ScalarField::setValue(), ccDrawableObject::showSF(), cloudViewer::PointCloudTpl< ccGenericPointCloud >::size(), cloudViewer::ReferenceCloud::size(), cloudViewer::GenericProgressCallback::start(), cloudViewer::GenericProgressCallback::stop(), STRAIGHTENED_CONE, STRAIGHTENED_CONE2, cloudViewer::GenericProgressCallback::textCanBeEdited(), Tuple3Tpl< Type >::u, cloudViewer::GenericProgressCallback::update(), CVLog::Warning(), Tuple3Tpl< Type >::x, Tuple3Tpl< Type >::y, and Tuple3Tpl< Type >::z.

◆ VoxelDownSample()

std::shared_ptr< ccPointCloud > ccPointCloud::VoxelDownSample ( double  voxel_size)

Function to downsample input ccPointCloud into output ccPointCloud with a voxel.

Normals and colors are averaged if they exist.

Parameters
voxel_sizeDefines the resolution of the voxel grid, smaller value leads to denser output point cloud.

Definition at line 530 of file PointCloudFactory.cpp.

References cloudViewer::utility::floor(), has_colors, has_normals, LogDebug, LogError, LogWarning, size, voxel_index, and voxel_size.

Referenced by convert(), cloudViewer::visualization::VisualizerWithEditing::KeyPressCallback(), cloudViewer::t::geometry::LegacyEstimateNormals(), cloudViewer::t::geometry::LegacyRemoveRadiusOutliers(), cloudViewer::t::geometry::LegacyRemoveStatisticalOutliers(), and cloudViewer::pipelines::registration::LoadPointCloud().

◆ VoxelDownSampleAndTrace()

std::tuple< std::shared_ptr< ccPointCloud >, Eigen::MatrixXi, std::vector< std::vector< int > > > ccPointCloud::VoxelDownSampleAndTrace ( double  voxel_size,
const Eigen::Vector3d &  min_bound,
const Eigen::Vector3d &  max_bound,
bool  approximate_class = false 
) const

Function to downsample using geometry.ccPointCloud.VoxelDownSample.

Also records point cloud index before downsampling.

Parameters
voxel_sizeVoxel size to downsample into.
min_boundMinimum coordinate of voxel boundaries
max_boundMaximum coordinate of voxel boundaries
approximate_classWhether to approximate.

Definition at line 634 of file PointCloudFactory.cpp.

References cloudViewer::utility::floor(), has_colors, has_normals, LogDebug, LogError, LogWarning, size, voxel_index, and voxel_size.

◆ waveformProxy()

ccWaveformProxy ccPointCloud::waveformProxy ( unsigned  index) const

◆ waveforms() [1/2]

◆ waveforms() [2/2]

const std::vector<ccWaveform>& ccPointCloud::waveforms ( ) const
inline

Gives access to the associated FWF data (const version)

Definition at line 517 of file ecvPointCloud.h.

Member Data Documentation

◆ covariances_

◆ m_currentDisplayedScalarField

ccScalarField* ccPointCloud::m_currentDisplayedScalarField
protected

◆ m_currentDisplayedScalarFieldIndex

int ccPointCloud::m_currentDisplayedScalarFieldIndex
protected

Currently displayed scalar field index.

Definition at line 1350 of file ecvPointCloud.h.

Referenced by deleteScalarField(), getCurrentDisplayedScalarField(), getCurrentDisplayedScalarFieldIndex(), and setCurrentDisplayedScalarField().

◆ m_fwfData

SharedFWFDataContainer ccPointCloud::m_fwfData
protected

Waveforms raw data storage.

Definition at line 1439 of file ecvPointCloud.h.

Referenced by compressFWFData(), hasFWF(), and waveformProxy().

◆ m_fwfDescriptors

FWFDescriptorSet ccPointCloud::m_fwfDescriptors
protected

General waveform descriptors.

Definition at line 1433 of file ecvPointCloud.h.

Referenced by append(), clearFWFData(), minimumFileVersion_MeOnly(), partialClone(), SelectByIndex(), and waveformProxy().

◆ m_fwfWaveforms

◆ m_grids

std::vector<Grid::Shared> ccPointCloud::m_grids
protected

Associated grid structure.

Definition at line 1353 of file ecvPointCloud.h.

Referenced by append(), applyRigidTransformation(), removeVisiblePoints(), scale(), setRGBColor(), and unallocateColors().

◆ m_lod

ccPointCloudLOD* ccPointCloud::m_lod
protected

L.O.D. structure.

Definition at line 1429 of file ecvPointCloud.h.

Referenced by clearLOD(), and initLOD().

◆ m_normals

◆ m_rgbColors

◆ m_sfColorScaleDisplayed

bool ccPointCloud::m_sfColorScaleDisplayed
protected

Specifies whether current scalar field color scale should be displayed or not

Definition at line 1345 of file ecvPointCloud.h.

Referenced by sfColorScaleShown(), and showSFColorsScale().

◆ m_vboManager

vboSet ccPointCloud::m_vboManager
protected

Set of VBOs attached to this cloud.

Definition at line 1416 of file ecvPointCloud.h.

Referenced by releaseVBOs().

◆ m_visibilityCheckEnabled

bool ccPointCloud::m_visibilityCheckEnabled
protected

Whether visibility check is available or not (during comparison)

See ccPointCloud::testVisibility

Definition at line 1358 of file ecvPointCloud.h.

Referenced by testVisibility().


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