descriptions/ChunkIO.hpp
Go to the documentation of this file.
1 #pragma once
2 #ifndef LVR2_IO_HDF5_CHUNKIO_HPP
3 #define LVR2_IO_HDF5_CHUNKIO_HPP
4 
5 #include "ArrayIO.hpp"
6 #include "MeshIO.hpp"
7 #include "PointCloudIO.hpp"
10 #include "lvr2/io/Model.hpp"
11 
12 namespace lvr2
13 {
14 
15 template <typename FeatureBase, typename T>
16 struct IOType;
17 
18 template <typename FeatureBase>
20  using io_type = MeshIO<FeatureBase>;
21 };
22 
23 template <typename FeatureBase>
26 };
27 
28 template <typename FeatureBase>
29 class ChunkIO
30 {
31  public:
33 
34  void saveChunkSize(float chunkSize);
35 
37 
38  void save(BaseVector<std::size_t> amount,
39  float chunkSize,
40  BoundingBox<BaseVector<float>> boundingBox);
41 
42  template <typename T>
43  void saveChunk(T data, std::string layer, int x, int y, int z);
44 
46 
47  float loadChunkSize();
48 
50 
51  template <typename T>
52  T loadChunk(std::string layer, int x, int y, int z);
53 
54  protected:
55  FeatureBase* m_file_access = static_cast<FeatureBase*>(this);
57 
58  private:
59  const std::string m_chunkName = "chunks";
60  const std::string m_amountName = "amount";
61  const std::string m_chunkSizeName = "size";
62  const std::string m_boundingBoxName = "bounding_box";
63 };
64 
68 template <typename FeatureBase>
70 {
71  // DEPS
75  using deps = typename dep1::template Merge<dep2>::template Merge<dep3>;
76 
77  // add actual feature
78  using type = typename deps::template add_features<ChunkIO>::type;
79 };
80 
81 } // namespace lvr2
82 
83 #include "ChunkIO.tcc"
84 
85 #endif
ArrayIO.hpp
BaseVector.hpp
lvr2::ChunkIO::saveChunk
void saveChunk(T data, std::string layer, int x, int y, int z)
lvr2::FeatureConstruct
Helper class how to construct a IO feature with its dependencies.
Definition: FeatureBase.hpp:20
lvr2::BaseVector< std::size_t >
lvr2::IOType< FeatureBase, MeshBufferPtr >::io_type
MeshIO< FeatureBase > io_type
Definition: descriptions/ChunkIO.hpp:20
lvr2::FeatureConstruct< ChunkIO, FeatureBase >::deps
typename dep1::template Merge< dep2 >::template Merge< dep3 > deps
Definition: descriptions/ChunkIO.hpp:75
MeshIO.hpp
lvr2::PointBufferPtr
std::shared_ptr< PointBuffer > PointBufferPtr
Definition: PointBuffer.hpp:130
lvr2::PointCloudIO
Hdf5IO Feature for handling PointBuffer related IO.
Definition: descriptions/PointCloudIO.hpp:45
lvr2::FeatureConstruct< ChunkIO, FeatureBase >::dep2
typename FeatureConstruct< MeshIO, FeatureBase >::type dep2
Definition: descriptions/ChunkIO.hpp:73
lvr2::ChunkIO
Definition: ChunkIO.hpp:54
lvr2::ChunkIO::saveAmount
void saveAmount(BaseVector< std::size_t > amount)
lvr2::ChunkIO::m_array_io
ArrayIO< FeatureBase > * m_array_io
Definition: descriptions/ChunkIO.hpp:56
lvr2::ChunkIO::m_file_access
FeatureBase * m_file_access
Definition: descriptions/ChunkIO.hpp:55
lvr2::ArrayIO
Definition: descriptions/ArrayIO.hpp:11
lvr2::FeatureConstruct< ChunkIO, FeatureBase >::dep3
typename FeatureConstruct< PointCloudIO, FeatureBase >::type dep3
Definition: descriptions/ChunkIO.hpp:74
lvr2::FeatureConstruct< ChunkIO, FeatureBase >::type
typename deps::template add_features< ChunkIO >::type type
Definition: descriptions/ChunkIO.hpp:78
lvr2::FeatureConstruct< ChunkIO, FeatureBase >::dep1
typename FeatureConstruct< ArrayIO, FeatureBase >::type dep1
Definition: descriptions/ChunkIO.hpp:72
lvr2::ChunkIO::m_boundingBoxName
const std::string m_boundingBoxName
Definition: ChunkIO.hpp:142
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::IOType
Definition: descriptions/ChunkIO.hpp:16
Model.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
PointCloudIO.hpp
lvr2::FeatureConstruct::type
typename Derived::template add_features< Feature >::type type
Definition: FeatureBase.hpp:151
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::ChunkIO::saveBoundingBox
void saveBoundingBox(BoundingBox< BaseVector< float >> boundingBox)
lvr2
Definition: BaseBufferManipulators.hpp:39
lvr2::ChunkIO::m_chunkSizeName
const std::string m_chunkSizeName
Definition: ChunkIO.hpp:141
lvr2::MeshBufferPtr
std::shared_ptr< MeshBuffer > MeshBufferPtr
Definition: MeshBuffer.hpp:217
lvr2::ChunkIO::save
void save(BaseVector< std::size_t > amount, float chunkSize, BoundingBox< BaseVector< float >> boundingBox)
lvr2::ChunkIO::loadChunk
lvr2::MeshBufferPtr loadChunk(std::string chunkName)
load a mesh from a group with the given cellIndex
Definition: ChunkIO.cpp:140
lvr2::FeatureBase
Manager Class for all FeatureBase components located in hdf5 directory.
Definition: FeatureBase.hpp:31
lvr2::ChunkIO::m_amountName
const std::string m_amountName
Definition: ChunkIO.hpp:140
lvr2::ChunkIO::saveChunkSize
void saveChunkSize(float chunkSize)


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