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

Set of (core) point descriptors. More...

#include <ccPointDescriptor.h>

Inheritance diagram for CorePointDescSet:
Collaboration diagram for CorePointDescSet:

Public Member Functions

 CorePointDescSet ()
 
 CorePointDescSet (size_t sz)
 
 CorePointDescSet (size_t sz, const CorePointDesc &defaultVal)
 
 CorePointDescSet (const CorePointDescSet &descSet)
 
QByteArray toByteArray () const
 Converts structure to a byte array. More...
 
bool fromByteArray (const QByteArray &data)
 Inits structure from a byte array. More...
 
bool loadFromMSC (QString filename, QString &error, ccPointCloud *corePoints=0)
 Loads structure of descriptors from an ".msc" file (see Brodu's version) More...
 
const std::vector< float > & scales () const
 Returns associated scales. More...
 
bool setScales (const std::vector< float > &scales)
 Sets associated scales. More...
 
const unsigned descriptorID () const
 Returns associated descriptor ID. More...
 
void setDescriptorID (unsigned ID)
 Sets associated descriptor ID. More...
 
const unsigned dimPerScale () const
 Returns the number of dimensions per scale. More...
 
void setDimPerScale (unsigned dim)
 Sets associated descriptor ID. More...
 

Protected Attributes

std::vector< float > m_scales
 Associated scales. More...
 
unsigned m_descriptorID
 Associated descriptor ID. More...
 
unsigned m_dimPerScale
 Dimensions per scale. More...
 

Detailed Description

Set of (core) point descriptors.

Definition at line 102 of file ccPointDescriptor.h.

Constructor & Destructor Documentation

◆ CorePointDescSet() [1/4]

CorePointDescSet::CorePointDescSet ( )
inline

Definition at line 104 of file ccPointDescriptor.h.

◆ CorePointDescSet() [2/4]

CorePointDescSet::CorePointDescSet ( size_t  sz)
inline

Definition at line 105 of file ccPointDescriptor.h.

◆ CorePointDescSet() [3/4]

CorePointDescSet::CorePointDescSet ( size_t  sz,
const CorePointDesc defaultVal 
)
inline

Definition at line 107 of file ccPointDescriptor.h.

◆ CorePointDescSet() [4/4]

CorePointDescSet::CorePointDescSet ( const CorePointDescSet descSet)
inline

Definition at line 111 of file ccPointDescriptor.h.

Member Function Documentation

◆ descriptorID()

const unsigned CorePointDescSet::descriptorID ( ) const
inline

Returns associated descriptor ID.

Definition at line 137 of file ccPointDescriptor.h.

References m_descriptorID.

Referenced by qCanupoProcess::Classify(), fromByteArray(), and qCanupoTools::TrainClassifier().

◆ dimPerScale()

const unsigned CorePointDescSet::dimPerScale ( ) const
inline

Returns the number of dimensions per scale.

Definition at line 142 of file ccPointDescriptor.h.

References m_dimPerScale.

Referenced by qCanupoProcess::Classify(), fromByteArray(), and qCanupoTools::TrainClassifier().

◆ fromByteArray()

bool CorePointDescSet::fromByteArray ( const QByteArray &  data)

◆ loadFromMSC()

bool CorePointDescSet::loadFromMSC ( QString  filename,
QString &  error,
ccPointCloud corePoints = 0 
)

Loads structure of descriptors from an ".msc" file (see Brodu's version)

Definition at line 588 of file ccPointDescriptor.cpp.

References ecvColor::LookUpTable::at(), corePoints, DESC_DIMENSIONALITY, error(), filename, m_descriptorID, m_dimPerScale, scales(), and setScales().

Referenced by qCanupoPlugin::doClassifyAction().

◆ scales()

const std::vector<float>& CorePointDescSet::scales ( ) const
inline

◆ setDescriptorID()

void CorePointDescSet::setDescriptorID ( unsigned  ID)
inline

Sets associated descriptor ID.

Definition at line 139 of file ccPointDescriptor.h.

References m_descriptorID.

Referenced by qCanupoTools::ComputeCorePointsDescriptors().

◆ setDimPerScale()

void CorePointDescSet::setDimPerScale ( unsigned  dim)
inline

Sets associated descriptor ID.

Definition at line 144 of file ccPointDescriptor.h.

References m_dimPerScale.

Referenced by qCanupoTools::ComputeCorePointsDescriptors().

◆ setScales()

bool CorePointDescSet::setScales ( const std::vector< float > &  scales)

Sets associated scales.

Warning
Automatically resize the descriptors 'params' vector
Call this AFTER having resized the vector!
Returns
success

Definition at line 565 of file ccPointDescriptor.cpp.

References ecvColor::LookUpTable::at(), m_dimPerScale, m_scales, scales(), and size.

Referenced by qCanupoTools::ComputeCorePointsDescriptors(), fromByteArray(), and loadFromMSC().

◆ toByteArray()

QByteArray CorePointDescSet::toByteArray ( ) const

Converts structure to a byte array.

Definition at line 451 of file ccPointDescriptor.cpp.

References ecvColor::LookUpTable::at(), m_descriptorID, m_dimPerScale, m_scales, CorePointDesc::params, and size.

Referenced by qCanupoProcess::Classify().

Member Data Documentation

◆ m_descriptorID

unsigned CorePointDescSet::m_descriptorID
protected

Associated descriptor ID.

Definition at line 151 of file ccPointDescriptor.h.

Referenced by descriptorID(), fromByteArray(), loadFromMSC(), setDescriptorID(), and toByteArray().

◆ m_dimPerScale

unsigned CorePointDescSet::m_dimPerScale
protected

Dimensions per scale.

Definition at line 154 of file ccPointDescriptor.h.

Referenced by dimPerScale(), fromByteArray(), loadFromMSC(), setDimPerScale(), setScales(), and toByteArray().

◆ m_scales

std::vector<float> CorePointDescSet::m_scales
protected

Associated scales.

Definition at line 148 of file ccPointDescriptor.h.

Referenced by scales(), setScales(), and toByteArray().


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