Skip to content

Commit

Permalink
fixed errors in examples
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://svn.pointclouds.org/pcl/trunk@7355 a9d63959-f2ad-4865-b262-bf0e56cfafb6
  • Loading branch information
stevefox committed Sep 29, 2012
1 parent 0a1f76b commit 11f171b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion examples/outofcore/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ if (BUILD_outofcore)

PCL_SUBSYS_DEPEND (build ${SUBSYS_NAME} DEPS outofcore io common octree filters)

# PCL_ADD_EXAMPLE (pcl_example_outofcore_with_lod FILES pcl_example_outofcore_with_lod.cpp LINK_WITH pcl_outofcore pcl_common pcl_io pcl_octree pcl_filters)
PCL_ADD_EXAMPLE (pcl_example_outofcore_with_lod FILES pcl_example_outofcore_with_lod.cpp LINK_WITH pcl_outofcore pcl_common pcl_io pcl_octree pcl_filters)

PCL_ADD_EXAMPLE (pcl_example_outofcore FILES pcl_example_outofcore.cpp LINK_WITH pcl_outofcore pcl_common pcl_io pcl_octree pcl_filters)

Expand Down
22 changes: 13 additions & 9 deletions examples/outofcore/pcl_example_outofcore_with_lod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,17 @@
* $Id$
*/

#include <pcl/io/pcd_io.h>
#include <pcl/console/print.h>

#include <pcl/outofcore/outofcore.h>
#include <pcl/outofcore/outofcore_impl.h>

using namespace pcl::outofcore;

typedef OutofcoreOctreeBase<OutofcoreOctreeDiskContainer<pcl::PointXYZ>, pcl::PointXYZ> OctreeDisk;
typedef OutofcoreOctreeBaseNode<OutofcoreOctreeDiskContainer<pcl::PointXY>, pcl::PointXYZ> OctreeDiskNode;

int main (int argc, char** argv)
{

Expand All @@ -56,16 +67,9 @@ int main (int argc, char** argv)

octree->addPointCloud (cloud, false);

octree->sync ();

pcl::RandomSample<sensor_msgs::PointCloud2>::Ptr random_sampler (new pcl::RandomSample<sensor_msgs::PointCloud2>());
octree->setLODFilter (random_sampler);
octree->setMultiresolution (true);
octree->setSamplePercentage (0.125);
octree->setBuildStyle (OUTOFCORE_RECURSIVE);
octree->buildLOD ();
octree->setSamplePercent (0.125);

octree->sync ();
octree->buildLOD ();

return (0);
}

0 comments on commit 11f171b

Please sign in to comment.