-
大小: 18.48MB文件類型: .zip金幣: 1下載: 0 次發布日期: 2023-08-05
- 語言: 其他
- 標簽: CloudCompare??plugins??pointcloud??
資源簡介
該代碼是CloudCompare源碼,中間有自己添加的兩個基于PCL的插件,使用前需要事先編譯好PCL,并且需在區域增長分割插件工程目錄下按照readme文檔,添加相關文件目錄和文件。
代碼片段和文件信息
//##########################################################################
//#????????????????????????????????????????????????????????????????????????#
//#???????????????????????????????CCLIB????????????????????????????????????#
//#????????????????????????????????????????????????????????????????????????#
//#??This?program?is?free?software;?you?can?redistribute?it?and/or?modify??#
//#??it?under?the?terms?of?the?GNU?Library?General?Public?License?as???????#
//#??published?by?the?Free?Software?Foundation;?version?2?of?the?License.??#
//#????????????????????????????????????????????????????????????????????????#
//#??This?program?is?distributed?in?the?hope?that?it?will?be?useful???????#
//#??but?WITHOUT?ANY?WARRANTY;?without?even?the?implied?warranty?of????????#
//#??MERCHANTABILITY?or?FITNESS?FOR?A?PARTICULAR?PURPOSE.??See?the?????????#
//#??GNU?General?Public?License?for?more?details.??????????????????????????#
//#????????????????????????????????????????????????????????????????????????#
//#??????????COPYRIGHT:?EDF?R&D?/?TELECOM?ParisTech?(ENST-TSI)?????????????#
//#????????????????????????????????????????????????????????????????????????#
//##########################################################################
#include?“GenericChunkedArray.h“
#include?“AutoSegmentationTools.h“
//local
#include?“GenericIndexedCloudPersist.h“
#include?“GenericProgressCallback.h“
#include?“ReferenceCloud.h“
#include?“DgmOctree.h“
#include?“FastMarchingForPropagation.h“
#include?“ScalarFieldTools.h“
#include?“ScalarField.h“
//system
#include?
using?namespace?CCLib;
int?AutoSegmentationTools::labelConnectedComponents(GenericIndexedCloudPersist*?theCloud?uchar?level?bool?sixConnexity?GenericProgressCallback*?progressCb?DgmOctree*?_theOctree)
{
if?(!theCloud)
return?-1;
//compute?octree?if?none?was?provided
DgmOctree*?theOctree?=?_theOctree;
if?(!theOctree)
{
theOctree?=?new?DgmOctree(theCloud);
if?(theOctree->build(progressCb)<1)
{
delete?theOctree;
return?-1;
}
}
//we?use?the?default?scalar?field?to?store?components?labels
theCloud->enableScalarField();
int?result?=?theOctree->extractCCs(levelsixConnexityprogressCb);
//remove?octree?if?it?was?not?provided?as?input
if?(!_theOctree)
delete?theOctree;
return?result;
}
bool?AutoSegmentationTools::extractConnectedComponents(GenericIndexedCloudPersist*?theCloud?ReferenceCloudContainer&?cc)
{
unsigned?numberOfPoints?=?(theCloud???theCloud->size()?:?0);
if?(numberOfPoints?==?0)
return?false;
//components?should?have?already?been?labeled?and?labels?should?have?been?stored?in?the?active?scalar?field!
if?(!theCloud->isScalarFieldEnabled())
return?false;
cc.clear();
for?(unsigned?i=0;i {
ScalarType?slabel?=?theCloud->getPointScalarValue(i);
if?(slabel?>=?1.0)?//rejects?NaN?values?as?well
{
int?ccLabel?=?(int)theCloud->getPointScalarValue(i)-1;?//labels?stat?from?1!
//we?fill?the?CCs?vector?with?empty?components?until?we?reac
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2014-03-02?15:53??trunk-2.5.1\
?????文件?????????483??2013-07-13?16:43??trunk-2.5.1\.gitattributes
?????文件????????1873??2013-07-13?16:43??trunk-2.5.1\.gitignore
?????目錄???????????0??2014-03-02?15:52??trunk-2.5.1\CC\
?????文件????????1469??2013-07-13?16:43??trunk-2.5.1\CC\CMakeLists.txt
?????目錄???????????0??2014-03-02?15:52??trunk-2.5.1\CC\doc\
?????文件???????????7??2013-07-13?16:43??trunk-2.5.1\CC\doc\.gitignore
?????文件???????82224??2013-07-13?16:43??trunk-2.5.1\CC\doc\CCLib_doxygen_file
?????文件????????2832??2013-07-13?16:43??trunk-2.5.1\CC\doc\cclib_logo.png
?????目錄???????????0??2014-03-02?15:52??trunk-2.5.1\CC\include\
?????文件????????6466??2013-07-13?16:43??trunk-2.5.1\CC\include\AutoSegmentationTools.h
?????文件????????3553??2013-07-13?16:43??trunk-2.5.1\CC\include\CCConst.h
?????文件????????9160??2013-07-13?16:43??trunk-2.5.1\CC\include\CCGeom.h
?????文件????????3834??2013-07-13?16:43??trunk-2.5.1\CC\include\CCMiscTools.h
?????文件????????2336??2013-07-13?16:43??trunk-2.5.1\CC\include\CCShareable.h
?????文件????????1515??2013-07-13?16:43??trunk-2.5.1\CC\include\CCToolbox.h
?????文件????????1554??2013-07-13?16:43??trunk-2.5.1\CC\include\CCTypes.h
?????文件????????4896??2013-07-13?16:43??trunk-2.5.1\CC\include\ChamferDistanceTransform.h
?????文件???????10758??2013-07-13?16:43??trunk-2.5.1\CC\include\ChunkedPointCloud.h
?????文件????????1833??2013-07-13?16:43??trunk-2.5.1\CC\include\CloudCompareDll.h
?????文件???????10633??2013-07-13?16:43??trunk-2.5.1\CC\include\CloudSamplingTools.h
?????文件????????3991??2013-07-13?16:43??trunk-2.5.1\CC\include\ConjugateGradient.h
?????文件????????2507??2013-07-13?16:43??trunk-2.5.1\CC\include\DebugProgressCallback.h
?????文件????????3915??2013-07-13?16:43??trunk-2.5.1\CC\include\Delaunay2dMesh.h
?????文件???????49469??2013-07-13?16:43??trunk-2.5.1\CC\include\DgmOctree.h
?????文件????????4062??2013-07-13?16:43??trunk-2.5.1\CC\include\DgmOctreeReferenceCloud.h
?????文件???????19788??2013-07-13?16:43??trunk-2.5.1\CC\include\DistanceComputationTools.h
?????文件????????2579??2013-07-13?16:43??trunk-2.5.1\CC\include\ErrorFunction.h
?????文件????????6819??2013-07-13?16:43??trunk-2.5.1\CC\include\FastMarching.h
?????文件????????5176??2013-07-13?16:43??trunk-2.5.1\CC\include\FastMarchingForPropagation.h
?????文件???????30687??2013-07-13?16:43??trunk-2.5.1\CC\include\GenericChunkedArray.h
............此處省略1672個文件信息
- 上一篇:web前端網頁psd
- 下一篇:區塊鏈:技術驅動金融超高清pdf
評論
共有 條評論