#include "opals/Exception.hpp"
#include "opals/ParamList.hpp"
#include "opals/ModuleDeleter.hpp"
#include "opals/ISegmentation.hpp"
#include "DM/IDatamanager.hpp"
#include "DM/IPolyline.hpp"
#include <iostream>
#include <iomanip>
#include <memory>
#include "opals/IImport.hpp"
#include "opals/INormals.hpp"
{
std::cout << "attributes: ";
std::cout << "NONE";
else
{
for (
unsigned i = 0; i <
info.columns(); i++)
{
if (i > 0)
std::cout << ", ";
std::cout <<
info.name(i) <<
"=";
std::cout << "NULL";
else
{
{
std::cout <<
info.getInt32(i);
break;
std::cout <<
info.getUInt32(i);
break;
std::cout <<
info.getInt8(i);
break;
std::cout <<
info.getUInt8(i);
break;
std::cout <<
info.getInt16(i);
break;
std::cout <<
info.getUInt16(i);
break;
std::cout <<
info.getFloat(i);
break;
std::cout <<
info.getDouble(i);
break;
std::cout <<
info.getInt64(i);
break;
std::cout <<
info.getCStr(i);
break;
}
}
}
}
std::cout << std::endl;
}
{
imp->opts().inFile().set(infiles);
imp->opts().tileSize().set(100);
imp->opts().filter().set("generic[z>265]");
imp->run();
imp.reset();
normals->opts().inFile().set(name + ".odm");
normals->opts().neighbours().set(8);
normals->opts().searchRadius().set(1);
normals->run();
}
int main(int argc, char** argv)
{
int errorCode = 0;
try {
preprocessing("strip21");
std::shared_ptr<opals::ISegmentation> module( opals::ISegmentation::New(),
opals::ModuleDeleter() );
module->opts().inFile().set("strip21.odm");
module->opts().searchRadius().set(radius);
module->opts().minSegSize().set(50);
module->opts().planeExtraction().maxDist().set(0.2);
module->opts().planeExtraction().maxSigma().set(0.15);
module->opts().planeExtraction().seedCalculator().set("NormalSigma0<0.02 AND Z > 275 ? NormalSigma0 : invalid");
filters[0] = "Region[529568.8 5338773.5 529863 5338773.9 529862.6 5338642.4 529706 5338685.4 529569.1 5338753.8]";
module->opts().filter().set(filters);
module->opts().alphaRadius().set(1);
module->run();
std::cout <<
"The segmentation process has found " << segManager->
sizeSegments() <<
" segment(s)" << std::endl;
unsigned max_pt_output = 5;
for (auto it = segs.begin(); it != segs.end(); ++it)
{
std::cout << std::fixed << std::setprecision(3);
std::cout <<
"Segment-Nr " << seg.
getID() <<
"\t " << seg.
sizePoints() <<
" points; "
<<
"COG (" << seg.
getCoG()->x() <<
" / " << seg.
getCoG()->y() <<
" / " << seg.
getCoG()->z() <<
")" << std::endl;
assert(planeParams.
size() == 5);
std::cout << std::fixed << std::setprecision(4);
std::cout << "\tplane parameters: a=" << planeParams[0] << " b=" << planeParams[1] << " c=" << planeParams[2]
<< " d=" << planeParams[3] << std::setprecision(3) << " (sigma0=" << planeParams[4] << ")" << std::endl;
if (alphaShape)
{
std::cout <<
"\talpha shape consists of " <<
alphaShape->sizePart() <<
" parts:" << std::endl;
unsigned idx = 0;
{
std::cout <<
"\t\t" << idx <<
" part has " << part.
sizePoint() <<
" points";
output_addinfo(part.
info());
}
}
std::cout << "\touput the first " << max_pt_output << " points: " << std::endl;
unsigned idx = 0;
for (auto it = ptIds.begin(); it != ptIds.end(); ++it, ++idx)
{
std::cout << "\t\t" << idx << std::setprecision(3) << ".point (" << pt->x() << " / " << pt->y() << " / " << pt->z() << ")" << std::endl;
if (idx + 1 >= max_pt_output)
break;
}
}
}
{
}
return errorCode;
}