3 #include <condition_variable>
15 #include <pcl/outofcore/outofcore.h>
16 #include <pcl/outofcore/outofcore_impl.h>
17 #include <pcl/outofcore/impl/lru_cache.hpp>
24 #include <vtkActorCollection.h>
25 #include <vtkAppendPolyData.h>
26 #include <vtkDataSetMapper.h>
27 #include <vtkPolyData.h>
28 #include <vtkSmartPointer.h>
45 using AlignedPointT = Eigen::aligned_allocator<PointT>;
49 using CloudActorMap = std::map<std::string, vtkSmartPointer<vtkActor> >;
77 using PcdQueue = std::priority_queue<PcdQueueItem>;
90 this->
item = cloud_data;
97 return item->GetActualMemorySize();
115 OutofcoreCloud (std::string name, boost::filesystem::path& tree_root);
139 return cloud_actors_;
145 if (displayDepth < 0)
149 else if (
static_cast<unsigned int> (displayDepth) > octree_->getDepth ())
151 displayDepth = octree_->getDepth ();
154 if (display_depth_ !=
static_cast<std::uint64_t
> (displayDepth))
156 display_depth_ = displayDepth;
165 return display_depth_;
171 return points_loaded_;
195 voxel_actor_->SetVisibility (display_voxels);
201 return voxel_actor_->GetVisibility ();
207 render_camera_ = render_camera;
213 return lod_pixel_threshold_;
219 if (lod_pixel_threshold <= 1000)
220 lod_pixel_threshold = 1000;
222 lod_pixel_threshold_ = lod_pixel_threshold;
230 if (lod_pixel_threshold_ >= 50000)
232 if (lod_pixel_threshold_ >= 10000)
234 else if (lod_pixel_threshold_ >= 1000)
237 lod_pixel_threshold_ += value;
238 std::cout <<
"Increasing lod pixel threshold: " << lod_pixel_threshold_ << std::endl;
245 if (lod_pixel_threshold_ > 50000)
247 else if (lod_pixel_threshold_ > 10000)
249 else if (lod_pixel_threshold_ > 1000)
252 lod_pixel_threshold_ -= value;
254 if (lod_pixel_threshold_ < 100)
255 lod_pixel_threshold_ = 100;
256 std::cout <<
"Decreasing lod pixel threshold: " << lod_pixel_threshold_ << std::endl;
260 render (vtkRenderer* renderer)
override;
266 OctreeDiskPtr octree_;
268 std::uint64_t display_depth_;
269 std::uint64_t points_loaded_;
270 std::uint64_t data_loaded_;
272 Eigen::Vector3d bbox_min_, bbox_max_;
276 int lod_pixel_threshold_;
280 std::map<std::string, vtkSmartPointer<vtkActor> > cloud_actors_map_;