3 #include <condition_variable>
14 #include <pcl/outofcore/outofcore.h>
15 #include <pcl/outofcore/outofcore_impl.h>
16 #include <pcl/outofcore/impl/lru_cache.hpp>
23 #include <vtkActorCollection.h>
24 #include <vtkAppendPolyData.h>
25 #include <vtkDataSetMapper.h>
26 #include <vtkPolyData.h>
27 #include <vtkSmartPointer.h>
44 using AlignedPointT = Eigen::aligned_allocator<PointT>;
48 using CloudActorMap = std::map<std::string, vtkSmartPointer<vtkActor> >;
76 using PcdQueue = std::priority_queue<PcdQueueItem>;
89 this->
item = cloud_data;
96 return item->GetActualMemorySize();
114 OutofcoreCloud (std::string name, boost::filesystem::path& tree_root);
138 return cloud_actors_;
144 if (displayDepth < 0)
148 else if (
static_cast<unsigned int> (displayDepth) > octree_->getDepth ())
150 displayDepth = octree_->getDepth ();
153 if (display_depth_ !=
static_cast<std::uint64_t> (displayDepth))
155 display_depth_ = displayDepth;
164 return display_depth_;
170 return points_loaded_;
194 voxel_actor_->SetVisibility (display_voxels);
200 return voxel_actor_->GetVisibility ();
206 render_camera_ = render_camera;
212 return lod_pixel_threshold_;
218 if (lod_pixel_threshold <= 1000)
219 lod_pixel_threshold = 1000;
221 lod_pixel_threshold_ = lod_pixel_threshold;
229 if (lod_pixel_threshold_ >= 50000)
231 if (lod_pixel_threshold_ >= 10000)
233 else if (lod_pixel_threshold_ >= 1000)
236 lod_pixel_threshold_ += value;
237 std::cout <<
"Increasing lod pixel threshold: " << lod_pixel_threshold_ << std::endl;
244 if (lod_pixel_threshold_ > 50000)
246 else if (lod_pixel_threshold_ > 10000)
248 else if (lod_pixel_threshold_ > 1000)
251 lod_pixel_threshold_ -= value;
253 if (lod_pixel_threshold_ < 100)
254 lod_pixel_threshold_ = 100;
255 std::cout <<
"Decreasing lod pixel threshold: " << lod_pixel_threshold_ << std::endl;
259 render (vtkRenderer* renderer)
override;
265 OctreeDiskPtr octree_;
271 Eigen::Vector3d bbox_min_, bbox_max_;
275 int lod_pixel_threshold_;
279 std::map<std::string, vtkSmartPointer<vtkActor> > cloud_actors_map_;