1 #ifndef PCL_OUTOFCORE_OUTOFCORE_CLOUD_H_
2 #define PCL_OUTOFCORE_OUTOFCORE_CLOUD_H_
7 #include <pcl/point_types.h>
10 #include <pcl/outofcore/outofcore.h>
11 #include <pcl/outofcore/outofcore_impl.h>
13 #include <pcl/outofcore/impl/lru_cache.hpp>
21 #include <vtkActorCollection.h>
22 #include <vtkAppendPolyData.h>
23 #include <vtkDataSetMapper.h>
28 #include <vtkPolyData.h>
31 #include <vtkSmartPointer.h>
47 typedef boost::shared_ptr<OctreeDisk> OctreeDiskPtr;
48 typedef Eigen::aligned_allocator<PointT> AlignedPointT;
52 typedef std::map<std::string, vtkSmartPointer<vtkActor> > CloudActorMap;
84 typedef std::priority_queue<PcdQueueItem>
PcdQueue;
97 this->
item = cloud_data;
104 return item->GetActualMemorySize();
122 OutofcoreCloud (std::string name, boost::filesystem::path& tree_root);
146 return cloud_actors_;
152 if (displayDepth < 0)
156 else if (displayDepth > octree_->getDepth ())
158 displayDepth = octree_->getDepth ();
161 if (display_depth_ != displayDepth)
163 display_depth_ = displayDepth;
172 return display_depth_;
178 return points_loaded_;
202 voxel_actor_->SetVisibility (display_voxels);
208 return voxel_actor_->GetVisibility ();
214 render_camera_ = render_camera;
220 return lod_pixel_threshold_;
226 if (lod_pixel_threshold <= 1000)
227 lod_pixel_threshold = 1000;
229 lod_pixel_threshold_ = lod_pixel_threshold;
237 if (lod_pixel_threshold_ >= 50000)
239 if (lod_pixel_threshold_ >= 10000)
241 else if (lod_pixel_threshold_ >= 1000)
244 lod_pixel_threshold_ += value;
245 std::cout <<
"Increasing lod pixel threshold: " << lod_pixel_threshold_ << endl;
252 if (lod_pixel_threshold_ > 50000)
254 else if (lod_pixel_threshold_ > 10000)
256 else if (lod_pixel_threshold_ > 1000)
259 lod_pixel_threshold_ -= value;
261 if (lod_pixel_threshold_ < 100)
262 lod_pixel_threshold_ = 100;
263 std::cout <<
"Decreasing lod pixel threshold: " << lod_pixel_threshold_ << endl;
267 render (vtkRenderer* renderer);
273 OctreeDiskPtr octree_;
275 uint64_t display_depth_;
276 uint64_t points_loaded_;
277 uint64_t data_loaded_;
279 Eigen::Vector3d bbox_min_, bbox_max_;
283 int lod_pixel_threshold_;
287 std::map<std::string, vtkSmartPointer<vtkActor> > cloud_actors_map_;
291 EIGEN_MAKE_ALIGNED_OPERATOR_NEW