ChunkIO.hpp
Go to the documentation of this file.
1 
35 #ifndef CHUNKIO_HPP
36 #define CHUNKIO_HPP
37 
39 #include "lvr2/io/Model.hpp"
40 
42 #include "lvr2/io/hdf5/ArrayIO.hpp"
44 #include "lvr2/io/hdf5/MeshIO.hpp"
46 
47 namespace lvr2 {
53 
54 class ChunkIO{
55 
56  public:
57  ChunkIO();
62  ChunkIO(std::string filePath);
63 
67  void writeBasicStructure(BaseVector<std::size_t> amount, float chunksize, BoundingBox<BaseVector<float>> boundingBox);
68 
72  void writeChunk(lvr2::MeshBufferPtr mesh, size_t x, size_t y, size_t z);
73 
77  lvr2::MeshBufferPtr loadChunk(std::string chunkName);
78 
83 
88 
92  float loadChunkSize();
96  void writeVoxelSize(float voxelSize);
100  float readVoxelSize();
104  boost::shared_array<bool> lsrLoadExtruded(string chunkName);
108  boost::shared_array<float> lsrLoadQueryPoints(string chunkName);
112  size_t lsrLoadNumCells(string chunkName);
116  boost::shared_array<float> lsrLoadCenters(string chunkName);
125  void writeTSDF(string cellName,
126  size_t csize,
127  boost::shared_array<float> centers,
128  boost::shared_array<bool> extruded,
129  boost::shared_array<float> queryPoints);
130 
131  private:
132  // path to the hdf5 file
133  std::string m_filePath;
134  // hdf5Io object to save and load chunks
136 
137 
138  // default names for the groups
139  const std::string m_chunkName = "chunks";
140  const std::string m_amountName = "amount";
141  const std::string m_chunkSizeName = "size";
142  const std::string m_boundingBoxName = "bounding_box";
143 
144 
145 };
146 } // namespace lvr2
147 
148 #endif //CHUNKIO_HPP
lvr2::ChunkHDF5IO
lvr2::Hdf5IO< lvr2::hdf5features::ArrayIO, lvr2::hdf5features::ChannelIO, lvr2::hdf5features::VariantChannelIO, lvr2::hdf5features::MeshIO > ChunkHDF5IO
Definition: ChunkIO.hpp:52
lvr2::ChunkIO::lsrLoadNumCells
size_t lsrLoadNumCells(string chunkName)
loads and returns the number of cells/voxel in the chunk
Definition: ChunkIO.cpp:209
BaseVector.hpp
lvr2::Hdf5IO
Manager Class for all Hdf5IO components located in hdf5 directory.
Definition: HDF5FeatureBase.hpp:38
lvr2::BaseVector< std::size_t >
MeshIO.hpp
lvr2::ChunkIO::lsrLoadExtruded
boost::shared_array< bool > lsrLoadExtruded(string chunkName)
load the extruded value for the cells/voxel of one chunk
Definition: ChunkIO.cpp:250
VariantChannelIO.hpp
lvr2::ChunkIO
Definition: ChunkIO.hpp:54
lvr2::ChunkIO::m_filePath
std::string m_filePath
Definition: ChunkIO.hpp:133
lvr2::ChunkIO::writeTSDF
void writeTSDF(string cellName, size_t csize, boost::shared_array< float > centers, boost::shared_array< bool > extruded, boost::shared_array< float > queryPoints)
Writes the parameters in the HDF5 file.
Definition: ChunkIO.cpp:163
lvr2::ChunkIO::readVoxelSize
float readVoxelSize()
returns the voxelsize
Definition: ChunkIO.cpp:156
lvr2::ChunkIO::writeChunk
void writeChunk(lvr2::MeshBufferPtr mesh, size_t x, size_t y, size_t z)
write a mesh in a group with the given cellIndex
Definition: ChunkIO.cpp:70
lvr2::ChunkIO::m_boundingBoxName
const std::string m_boundingBoxName
Definition: ChunkIO.hpp:142
lvr2::ChunkIO::writeVoxelSize
void writeVoxelSize(float voxelSize)
save reconstruction voxelsize in HDF5
Definition: ChunkIO.cpp:145
lvr2::hdf5features::VariantChannelIO
Hdf5IO Feature for handling VariantChannel related IO.
Definition: hdf5/VariantChannelIO.hpp:59
lvr2::ChunkIO::m_chunkName
const std::string m_chunkName
Definition: ChunkIO.hpp:139
lvr2::ChunkIO::loadBoundingBox
BoundingBox< BaseVector< float > > loadBoundingBox()
loads and returns the bounding box for the complete original mesh (that got chunked)
Definition: ChunkIO.cpp:120
lvr2::ChunkIO::lsrLoadCenters
boost::shared_array< float > lsrLoadCenters(string chunkName)
loads and returns the centers for the cells/voxel in one chunk
Definition: ChunkIO.cpp:185
Model.hpp
ChannelIO.hpp
HDF5FeatureBase.hpp
lvr2::BoundingBox
A dynamic bounding box class.
Definition: BoundingBox.hpp:49
lvr2::ChunkIO::loadChunkSize
float loadChunkSize()
loads and returns the chunksize
Definition: ChunkIO.cpp:101
lvr2::ChunkIO::writeBasicStructure
void writeBasicStructure(BaseVector< std::size_t > amount, float chunksize, BoundingBox< BaseVector< float >> boundingBox)
write amount, chunksize and the bounding box in the hdf5 file
Definition: ChunkIO.cpp:53
lvr2::ChunkIO::loadAmount
BaseVector< size_t > loadAmount()
loads and returns a BaseVector with the amount of chunks in each dimension
Definition: ChunkIO.cpp:83
lvr2
Definition: BaseBufferManipulators.hpp:39
lvr2::ChunkIO::m_chunkSizeName
const std::string m_chunkSizeName
Definition: ChunkIO.hpp:141
lvr2::ChunkIO::m_hdf5IO
ChunkHDF5IO m_hdf5IO
Definition: ChunkIO.hpp:135
lvr2::MeshBufferPtr
std::shared_ptr< MeshBuffer > MeshBufferPtr
Definition: MeshBuffer.hpp:217
lvr2::ChunkIO::ChunkIO
ChunkIO()
lvr2::ChunkIO::loadChunk
lvr2::MeshBufferPtr loadChunk(std::string chunkName)
load a mesh from a group with the given cellIndex
Definition: ChunkIO.cpp:140
lvr2::ChunkIO::m_amountName
const std::string m_amountName
Definition: ChunkIO.hpp:140
mesh
HalfEdgeMesh< Vec > mesh
Definition: src/tools/lvr2_gs_reconstruction/Main.cpp:26
lvr2::hdf5features::ArrayIO
Definition: hdf5/ArrayIO.hpp:13
ArrayIO.hpp
lvr2::ChunkIO::lsrLoadQueryPoints
boost::shared_array< float > lsrLoadQueryPoints(string chunkName)
loads and returns the Querypoint-distances for the cells/voxel of one chunk
Definition: ChunkIO.cpp:226
lvr2::hdf5features::ChannelIO
Definition: hdf5/ChannelIO.hpp:20
lvr2::hdf5features::MeshIO
Hdf5IO Feature for handling MeshBuffer related IO.
Definition: MeshIO.hpp:52


lvr2
Author(s): Thomas Wiemann , Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Wed Mar 2 2022 00:37:23