Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039 #ifndef PCL_OUTOFCORE_OCTREE_NODE_METADATA_H_
00040 #define PCL_OUTOFCORE_OCTREE_NODE_METADATA_H_
00041
00042 #include <pcl/pcl_macros.h>
00043 #include <pcl/outofcore/boost.h>
00044 #include <pcl/outofcore/cJSON.h>
00045
00046 #include <pcl/common/eigen.h>
00047
00048 #include <ostream>
00049
00050 namespace pcl
00051 {
00052 namespace outofcore
00053 {
00083 class PCL_EXPORTS OutofcoreOctreeNodeMetadata
00084 {
00085
00086 public:
00087
00088 typedef boost::shared_ptr<OutofcoreOctreeNodeMetadata> Ptr;
00089 typedef boost::shared_ptr<const OutofcoreOctreeNodeMetadata> ConstPtr;
00090
00092 OutofcoreOctreeNodeMetadata ();
00093 ~OutofcoreOctreeNodeMetadata ();
00094
00096 OutofcoreOctreeNodeMetadata (const OutofcoreOctreeNodeMetadata& orig);
00097
00099 const Eigen::Vector3d&
00100 getBoundingBoxMin () const;
00102 void
00103 setBoundingBoxMin (const Eigen::Vector3d& min_bb);
00105 const Eigen::Vector3d&
00106 getBoundingBoxMax () const;
00108 void
00109 setBoundingBoxMax (const Eigen::Vector3d& max_bb);
00110
00112 void
00113 getBoundingBox (Eigen::Vector3d &min_bb, Eigen::Vector3d &max_bb) const;
00115 void
00116 setBoundingBox (const Eigen::Vector3d& min_bb, const Eigen::Vector3d& max_bb);
00117
00119 const boost::filesystem::path&
00120 getDirectoryPathname () const;
00122 void
00123 setDirectoryPathname (const boost::filesystem::path& directory_pathname);
00124
00126 const boost::filesystem::path&
00127 getPCDFilename () const;
00129 void
00130 setPCDFilename (const boost::filesystem::path& point_filename);
00131
00133 int
00134 getOutofcoreVersion () const;
00136 void
00137 setOutofcoreVersion (const int version);
00138
00140 const boost::filesystem::path&
00141 getMetadataFilename () const;
00143 void
00144 setMetadataFilename (const boost::filesystem::path& path_to_metadata);
00145
00147 const Eigen::Vector3d&
00148 getVoxelCenter () const;
00149
00151 void
00152 serializeMetadataToDisk ();
00153
00155 int
00156 loadMetadataFromDisk ();
00158 int
00159 loadMetadataFromDisk (const boost::filesystem::path& path_to_metadata);
00160
00161 friend
00162 std::ostream& operator<<(std::ostream& os, const OutofcoreOctreeNodeMetadata& metadata_arg);
00163
00164 protected:
00166 Eigen::Vector3d min_bb_;
00168 Eigen::Vector3d max_bb_;
00170 boost::filesystem::path binary_point_filename_;
00172 Eigen::Vector3d midpoint_xyz_;
00174 boost::filesystem::path directory_;
00176 boost::filesystem::path metadata_filename_;
00178 int outofcore_version_;
00179
00181 inline void
00182 updateVoxelCenter ()
00183 {
00184 midpoint_xyz_ = (this->max_bb_ + this->min_bb_)/static_cast<double>(2.0);
00185 }
00186 };
00187 }
00188 }
00189
00190 #endif // PCL_OUTOFCORE_OCTREE_NODE_METADATA_H_