1 #ifndef PCL_OUTOFCORE_OUTOFCORE_CLOUD_H_
2 #define PCL_OUTOFCORE_OUTOFCORE_CLOUD_H_
12 #include <pcl/outofcore/outofcore.h>
13 #include <pcl/outofcore/outofcore_impl.h>
15 #include <pcl/outofcore/impl/lru_cache.hpp>
23 #include <vtkActorCollection.h>
24 #include <vtkAppendPolyData.h>
25 #include <vtkDataSetMapper.h>
30 #include <vtkPolyData.h>
33 #include <vtkSmartPointer.h>
49 typedef boost::shared_ptr<OctreeDisk> OctreeDiskPtr;
50 typedef Eigen::aligned_allocator<PointT> AlignedPointT;
54 typedef std::map<std::string, vtkSmartPointer<vtkActor> > CloudActorMap;
86 typedef std::priority_queue<PcdQueueItem>
PcdQueue;
99 this->
item = cloud_data;
106 return item->GetActualMemorySize();
124 OutofcoreCloud (std::string name, boost::filesystem::path& tree_root);
148 return cloud_actors_;
154 if (displayDepth < 0)
158 else if (
static_cast<unsigned int> (displayDepth) > octree_->getDepth ())
160 displayDepth = octree_->getDepth ();
163 if (display_depth_ !=
static_cast<uint64_t
> (displayDepth))
165 display_depth_ = displayDepth;
174 return display_depth_;
180 return points_loaded_;
204 voxel_actor_->SetVisibility (display_voxels);
210 return voxel_actor_->GetVisibility ();
216 render_camera_ = render_camera;
222 return lod_pixel_threshold_;
228 if (lod_pixel_threshold <= 1000)
229 lod_pixel_threshold = 1000;
231 lod_pixel_threshold_ = lod_pixel_threshold;
239 if (lod_pixel_threshold_ >= 50000)
241 if (lod_pixel_threshold_ >= 10000)
243 else if (lod_pixel_threshold_ >= 1000)
246 lod_pixel_threshold_ += value;
247 std::cout <<
"Increasing lod pixel threshold: " << lod_pixel_threshold_ << endl;
254 if (lod_pixel_threshold_ > 50000)
256 else if (lod_pixel_threshold_ > 10000)
258 else if (lod_pixel_threshold_ > 1000)
261 lod_pixel_threshold_ -= value;
263 if (lod_pixel_threshold_ < 100)
264 lod_pixel_threshold_ = 100;
265 std::cout <<
"Decreasing lod pixel threshold: " << lod_pixel_threshold_ << endl;
269 render (vtkRenderer* renderer);
275 OctreeDiskPtr octree_;
277 uint64_t display_depth_;
278 uint64_t points_loaded_;
279 uint64_t data_loaded_;
281 Eigen::Vector3d bbox_min_, bbox_max_;
285 int lod_pixel_threshold_;
289 std::map<std::string, vtkSmartPointer<vtkActor> > cloud_actors_map_;
293 EIGEN_MAKE_ALIGNED_OPERATOR_NEW